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 #if !defined(DART_IO_DISABLED) | 5 #if !defined(DART_IO_DISABLED) |
6 | 6 |
7 #include "bin/eventhandler.h" | 7 #include "bin/eventhandler.h" |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 if ((next_timeout_ == NULL) || | 52 if ((next_timeout_ == NULL) || |
53 (current->timeout() < next_timeout_->timeout())) { | 53 (current->timeout() < next_timeout_->timeout())) { |
54 next_timeout_ = current; | 54 next_timeout_ = current; |
55 } | 55 } |
56 current = current->next(); | 56 current = current->next(); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 static EventHandler* event_handler = NULL; | 61 static EventHandler* event_handler = NULL; |
62 static Monitor *shutdown_monitor = NULL; | 62 static Monitor* shutdown_monitor = NULL; |
63 | 63 |
64 | 64 |
65 void EventHandler::Start() { | 65 void EventHandler::Start() { |
66 // Initialize global socket registry. | 66 // Initialize global socket registry. |
67 ListeningSocketRegistry::Initialize(); | 67 ListeningSocketRegistry::Initialize(); |
68 | 68 |
69 ASSERT(event_handler == NULL); | 69 ASSERT(event_handler == NULL); |
70 shutdown_monitor = new Monitor(); | 70 shutdown_monitor = new Monitor(); |
71 event_handler = new EventHandler(); | 71 event_handler = new EventHandler(); |
72 event_handler->delegate_.Start(event_handler); | 72 event_handler->delegate_.Start(event_handler); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void FUNCTION_NAME(EventHandler_TimerMillisecondClock)( | 141 void FUNCTION_NAME(EventHandler_TimerMillisecondClock)( |
142 Dart_NativeArguments args) { | 142 Dart_NativeArguments args) { |
143 int64_t now = TimerUtils::GetCurrentMonotonicMillis(); | 143 int64_t now = TimerUtils::GetCurrentMonotonicMillis(); |
144 Dart_SetReturnValue(args, Dart_NewInteger(now)); | 144 Dart_SetReturnValue(args, Dart_NewInteger(now)); |
145 } | 145 } |
146 | 146 |
147 } // namespace bin | 147 } // namespace bin |
148 } // namespace dart | 148 } // namespace dart |
149 | 149 |
150 #endif // !defined(DART_IO_DISABLED) | 150 #endif // !defined(DART_IO_DISABLED) |
OLD | NEW |