-
Notifications
You must be signed in to change notification settings - Fork 1.2k
osx: use clock_gettime when it's available #4593
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
osx: use clock_gettime when it's available #4593
Conversation
Recent OSX distros have clock_gettime support. Use it when it's available (~3 times faster to what we do to replace that)
| inline static double GetSystemTimeREAL() | ||
| { | ||
| #ifndef __APPLE__ | ||
| #ifdef HAVE_WORKING_CLOCK_GETTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this macro get defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During pre-build by configure.cmake. It tests the feature on the system and then enables / disables for the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's part of the PAL cmake I think: https://github.com/Microsoft/ChakraCore/blob/97fdeb81f981c71bc3fc6263b310a810eb5a6374/pal/src/configure.cmake#L352
MSLaguana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think this should target release/1.9 rather than 1.8
|
It targets r1.8 due to timeouts on CI (slow running tests) |
|
@dilijev @MSLaguana Thanks for the review! |
Merge pull request #4593 from obastemur:use_clock_gettime_osx Recent OSX distros have clock_gettime support. Use it when it's available (~3 times faster to what we do to replace that)
…vailable Merge pull request #4593 from obastemur:use_clock_gettime_osx Recent OSX distros have clock_gettime support. Use it when it's available (~3 times faster to what we do to replace that)
…e when it's available Merge pull request #4593 from obastemur:use_clock_gettime_osx Recent OSX distros have clock_gettime support. Use it when it's available (~3 times faster to what we do to replace that)
Recent OSX distros have clock_gettime support. Use it when it's available (~3 times faster to what we do to replace that)