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

Side by Side Diff: runtime/bin/timer_impl.dart

Issue 10532123: - Move the Timer interface to the dart:isolate library so that it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/timer.dart ('k') | runtime/lib/isolate_sources.gypi » ('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 class _Timer implements Timer { 5 class _Timer implements Timer {
6 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms. 6 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms.
7 static final int _TIMER_JITTER = 0; 7 static final int _TIMER_JITTER = 0;
8 8
9 // Disables the timer. 9 // Disables the timer.
10 static final int _NO_TIMER = -1; 10 static final int _NO_TIMER = -1;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 static ReceivePort _receivePort; 180 static ReceivePort _receivePort;
181 static bool _handling_callbacks = false; 181 static bool _handling_callbacks = false;
182 182
183 var _callback; 183 var _callback;
184 int _milliSeconds; 184 int _milliSeconds;
185 int _wakeupTime; 185 int _wakeupTime;
186 bool _repeating; 186 bool _repeating;
187 } 187 }
188 188
189 // Provide a closure which will allocate a Timer object to be able to hook
190 // up the Timer interface in dart:isolate with the implementation here.
191 _getTimerFactoryClosure() {
192 return (int milliSeconds, void callback(Timer timer), bool repeating) {
193 if (repeating) {
194 return new _Timer.repeating(milliSeconds, callback);
195 }
196 return new _Timer(milliSeconds, callback);
197 };
198 }
199
200
OLDNEW
« no previous file with comments | « runtime/bin/timer.dart ('k') | runtime/lib/isolate_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698