alexcrichton / filetime

Accessing file timestamps in a platform-agnostic fashion in Rust
Apache License 2.0
122 stars 56 forks source link

Accuracy of setting times only to microsecond, not nanosecond (unix) #9

Closed ids1024 closed 6 years ago

ids1024 commented 7 years ago

I don't know if this really matters for much, but utimes only allows microsecond precision. The newer utimensat function would allow nanosecond precision; it's part of the latest Posix standard, but I don't know how widely available it is (or what the best method is to use it only where available, if it isn't essentially universal).

alexcrichton commented 7 years ago

Yeah I'd be totally fine to update! This probably won't work on all platforms but we can at least use it on the platforms that do support it.

pnkfelix commented 7 years ago

Indeed, its pretty goofy that right now we end up reading nanosecond precision values while writing values that have been truncated to millisecond precision.

I might attempt to take on fixing this.

pnkfelix commented 6 years ago

I think this was fixed by 1231f8a128b5af5fedfd117a7fc9c1800fabaeae