-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Fix so timers work through system time change #3414
Conversation
Hi @cmcqueen, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
@cmcqueen, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
approve |
As an aside, this reminds me of a neat trick:
Now |
we're using |
That's true. I would have checked |
Note, I also see that |
lgtm |
I just remembered #3165 and fear we might run into the same problem if we merge this. |
This patch uses |
@cmcqueen unfortunately not, since the issue is that Adding |
I've written the code so that if |
@cmcqueen the issue is that the OSX 10.12 SDK defines CLOCK_MONOTONIC/clock_gettime/etc irrespectively of whether those APIs are available on earlier OSX releases (we pass It means that if we compile with the 10.12 SDK the resulting binary won't run in say 10.11 since it doesn't have those APIs. |
Okay, thanks for explaining. Does the SDK correctly define (or not) Otherwise, I guess as you said, I should change the
or
I guess that would make all MAC OSX prone to the bug I was originally trying to fix (system time change disrupts timed waits). |
Let me know if you want me to make changes. (I'm currently not familiar with the process of modifying/redoing a pull request, but I guess I could figure that out.) |
@cmcqueen as far as I remember, it doesn't correctly hide _POSIX_MONOTONIC_CLOCK either. I think |
I've pushed an amended commit. |
@@ -1 +0,0 @@ | |||
Subproject commit 6c77197318fe85dfddf75a1b344b9bf8d0007b0b |
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.
@cmcqueen seems like this change snuck in, can you please revert it?
This makes timers operate against CLOCK_MONOTONIC rather than the default of using system time (CLOCK_REALTIME). https://bugzilla.xamarin.com/show_bug.cgi?id=3025 This patch is excluded for APPLE platforms, due to issues seen with MAC OSX SDK defining CLOCK_MONOTONIC even for platforms that don't support the clock_gettime(), clock_getres(), etc APIs. For background, see: https://bugzilla.xamarin.com/show_bug.cgi?id=41786
The conditions here can be simplified. We have required |
I see other cases in the mono code where there is an
If these are simplified to remove the Or, would you like me to simplify this patch anyway? |
It's fine to clean up the code in |
What is the current state of this pull request and the bug it was intended to fix? At the point of my last change, I wasn't able to keep modifying it to follow the changes in the related code. Now, what would it take to follow through on this? |
issue is still there in latest code |
This issue is affecting my application in Mono 4.8. I'd really like to see it resolved. |
An equivalent change has been merged with #4446 |
This makes timers operate against CLOCK_MONOTONIC rather than the
default of using system time (CLOCK_REALTIME).
https://bugzilla.xamarin.com/show_bug.cgi?id=3025