OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/globals.h" | 5 #include "platform/globals.h" |
6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
7 | 7 |
8 #include "bin/eventhandler.h" | 8 #include "bin/eventhandler.h" |
9 #include "bin/eventhandler_win.h" | 9 #include "bin/eventhandler_win.h" |
10 | 10 |
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 delete startup_monitor_; | 1345 delete startup_monitor_; |
1346 CloseHandle(completion_port_); | 1346 CloseHandle(completion_port_); |
1347 } | 1347 } |
1348 | 1348 |
1349 | 1349 |
1350 int64_t EventHandlerImplementation::GetTimeout() { | 1350 int64_t EventHandlerImplementation::GetTimeout() { |
1351 if (!timeout_queue_.HasTimeout()) { | 1351 if (!timeout_queue_.HasTimeout()) { |
1352 return kInfinityTimeout; | 1352 return kInfinityTimeout; |
1353 } | 1353 } |
1354 int64_t millis = timeout_queue_.CurrentTimeout() - | 1354 int64_t millis = timeout_queue_.CurrentTimeout() - |
1355 TimerUtils::GetCurrentTimeMilliseconds(); | 1355 TimerUtils::GetCurrentMonotonicMillis(); |
1356 return (millis < 0) ? 0 : millis; | 1356 return (millis < 0) ? 0 : millis; |
1357 } | 1357 } |
1358 | 1358 |
1359 | 1359 |
1360 void EventHandlerImplementation::SendData(intptr_t id, | 1360 void EventHandlerImplementation::SendData(intptr_t id, |
1361 Dart_Port dart_port, | 1361 Dart_Port dart_port, |
1362 int64_t data) { | 1362 int64_t data) { |
1363 InterruptMessage* msg = new InterruptMessage; | 1363 InterruptMessage* msg = new InterruptMessage; |
1364 msg->id = id; | 1364 msg->id = id; |
1365 msg->dart_port = dart_port; | 1365 msg->dart_port = dart_port; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 | 1463 |
1464 | 1464 |
1465 void EventHandlerImplementation::Shutdown() { | 1465 void EventHandlerImplementation::Shutdown() { |
1466 SendData(kShutdownId, 0, 0); | 1466 SendData(kShutdownId, 0, 0); |
1467 } | 1467 } |
1468 | 1468 |
1469 } // namespace bin | 1469 } // namespace bin |
1470 } // namespace dart | 1470 } // namespace dart |
1471 | 1471 |
1472 #endif // defined(TARGET_OS_WINDOWS) | 1472 #endif // defined(TARGET_OS_WINDOWS) |
OLD | NEW |