Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1979)

Unified Diff: runtime/bin/eventhandler_macos.cc

Issue 1519563003: Use a monotonic clock in the implementation of Timer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_macos.cc
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index edd0485cc06c67bb1dfc7520d3a83e1471e92f2c..faf471b2a0f02e1ac4a1f6664a97fd1ad71f591d 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -394,7 +394,7 @@ int64_t EventHandlerImplementation::GetTimeout() {
return kInfinityTimeout;
}
int64_t millis = timeout_queue_.CurrentTimeout() -
- TimerUtils::GetCurrentTimeMilliseconds();
+ TimerUtils::GetCurrentMonotonicMillis();
return (millis < 0) ? 0 : millis;
}
@@ -402,7 +402,7 @@ int64_t EventHandlerImplementation::GetTimeout() {
void EventHandlerImplementation::HandleTimeout() {
if (timeout_queue_.HasTimeout()) {
int64_t millis = timeout_queue_.CurrentTimeout() -
- TimerUtils::GetCurrentTimeMilliseconds();
+ TimerUtils::GetCurrentMonotonicMillis();
if (millis <= 0) {
DartUtils::PostNull(timeout_queue_.CurrentPort());
timeout_queue_.RemoveCurrent();
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698