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

Side by Side Diff: runtime/bin/eventhandler.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 unified diff | Download patch
« no previous file with comments | « runtime/bin/common_patch.dart ('k') | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/dartutils.h" 5 #include "bin/dartutils.h"
6 #include "bin/eventhandler.h" 6 #include "bin/eventhandler.h"
7 #include "bin/lockers.h" 7 #include "bin/lockers.h"
8 #include "bin/socket.h" 8 #include "bin/socket.h"
9 #include "bin/thread.h" 9 #include "bin/thread.h"
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 Dart_Port dart_port; 124 Dart_Port dart_port;
125 handle = Dart_SendPortGetId(handle, &dart_port); 125 handle = Dart_SendPortGetId(handle, &dart_port);
126 if (Dart_IsError(handle)) { 126 if (Dart_IsError(handle)) {
127 Dart_PropagateError(handle); 127 Dart_PropagateError(handle);
128 UNREACHABLE(); 128 UNREACHABLE();
129 } 129 }
130 int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2)); 130 int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
131 event_handler->SendData(id, dart_port, data); 131 event_handler->SendData(id, dart_port, data);
132 } 132 }
133 133
134
135 void FUNCTION_NAME(EventHandler_TimerMillisecondClock)(
136 Dart_NativeArguments args) {
137 int64_t now = TimerUtils::GetCurrentMonotonicMillis();
138 Dart_SetReturnValue(args, Dart_NewInteger(now));
139 }
140
134 } // namespace bin 141 } // namespace bin
135 } // namespace dart 142 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/common_patch.dart ('k') | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698