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

Use clock_gettime(CLOCK_MONOTONIC, ...) instead of gettimeofday? #1438

Closed
frank-dittrich opened this issue Jun 15, 2015 · 3 comments
Closed

Comments

@frank-dittrich
Copy link
Collaborator

Especially OpenCL format implementations seem to use gettimeofday to calculate differences between start time and end time.
Shouldn't clock_gettime(CLOCK_MONOTONIC, ...) be used here instead?
Reasons:
-leap seconds (the next one on June, 30th)
-NTP
etc.
clock_gettime() exists for _POSIX_C_SOURCE >= 199309L.

@magnumripper
Copy link
Member

The risk for this to cause a problem should be pretty slim, but if it's portable I guess we should change it anyway.

@magnumripper magnumripper added this to the 1.8.0-jumbo-2 milestone Jul 21, 2015
@jfoug jfoug modified the milestones: 1.8.0-jumbo-2 (non-showstopper), 1.8.0-jumbo-2 Aug 24, 2015
@magnumripper
Copy link
Member

There doesn't seem to exist any clock_gettime() in OSX. That alone suggests this will introduce portability problems.

@magnumripper
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants