Update to nanosecond resolution on FileTimes?
Alexander T
mittspamkonto at gmail.com
Thu Jun 1 19:43:52 UTC 2017
Hello Everyone!
My name is Alexander Torstling and I'm a software engineer from Stockholm.
This is my first mail so I hope that this is the right forum for this
subject. Please let me know if this is not the case.
So, to the matter at hand: While trying to get maximum resolution out of
file modification times on JDK8, I stumbled upon a comment in
sun/nio/fs/UnixFileAttributes#toFileTime(long,long)
(
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/sun/nio/fs/UnixFileAttributes.java#UnixFileAttributes.toFileTime%28long%2Clong%29
):
// truncate to microseconds to avoid overflow with timestamps
// way out into the future. We can re-visit this if FileTime
// is updated to define a from(secs,nsecs) method.
It seems like it's possible to re-visit this decision now, since FileTime
provides a "from(Instant)" method since
1.8, which would make it possible to up the resolution to nanoseconds.
I was wondering if this has already been done or is planned or how I could
help making this happen.
Best regards,
Alexander Torstling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20170601/aafd9b2d/attachment.html>
More information about the nio-discuss
mailing list