Java library for dealing with win32 FILETIME?

前端 未结 3 745
鱼传尺愫
鱼传尺愫 2021-02-06 11:28

Are there any Java libraries around for dealing with the win32 FILETIME/ time intervals ? It\'s basically a 64 bit timestamp in 100ns intervals since January 1, 1601.

(

3条回答
  •  难免孤独
    2021-02-06 11:37

    Last time I solved this using JNI... (Although not on Windows, this was unix)

    That is, a piece of C++ code that called the native OS functions, and then called that code using Java Native Interface.

    A bit clunky, but it was the only way I could find (Also needed the i-node).

    EDIT: Assuming the values are already obtained from some other source, Date4J can handle seconds with 9 decimals, but it is not as feature rich as Joda.

提交回复
热议问题