OLD | NEW |
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 Loading... |
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 |
OLD | NEW |