Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve File.utime precision from second to 100-nanosecond on Windows #9344

Merged

Conversation

kubo
Copy link
Contributor

@kubo kubo commented May 23, 2020

On Windows, File.utime is implemented by _wutime64 whose time precision is second. The subsecond parts of atime and mtime are zeroed.

This PR uses SetFileTime whose time precision is 100-nanosecond.

spec/std/file_spec.cr Outdated Show resolved Hide resolved
@kubo kubo force-pushed the improve-file-utime-precision-on-windows branch from 2bbf592 to 87b2600 Compare May 31, 2020 07:50
@straight-shoota straight-shoota added this to the 0.35.0 milestone May 31, 2020
@bcardiff bcardiff merged commit babe00e into crystal-lang:master Jun 1, 2020
@kubo kubo deleted the improve-file-utime-precision-on-windows branch June 6, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants