-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
date: implement --resolution flag
#8686
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
Conversation
7d97ae4 to
2aafa61
Compare
2aafa61 to
64c72d7
Compare
CodSpeed Performance ReportMerging #8686 will create unknown performance changesComparing Summary
|
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
I'm not sure how best to solve the redox os issue. Redox doesn't support the |
|
GNU testsuite comparison: |
|
Thanks for your PR! |
Implements the
--resolutionflag fordate. On unix platforms this uses the posix functionclock_getres. I could not find an equivalent syscall on windows, however every windows operating system since at least Windows 2000 has used a resolution of 100ns, so I decided to hardcode that as the returned resolution.I treated the
--resolutionflag as a date source like it is in GNU date, this allows other formatting flags to apply to the output of the--resolutionflag. I also tried to make sure the implementation would interact well with a future implementation of the--debugflag.As a bit of a drive by I also add conflicts_with annotations to the four date source options, this is to make the GNU date behaviour of failing when multiple date sources are specified. However, I'm not sure if I've taken the best approach for this, since the error message is different to GNU make and I'm not sure whether or not this is an issue.
fixes #6143