Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
clock_gettime has higher resolution, we should use it if available.
We could do this now but it would require making the choice at runtime. That seems difficult - we'd need to use the Darwin equivalent of dlopen/dlsym to query the existence of, and call, clock_gettime.