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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/timer_impl.dart
===================================================================
--- runtime/bin/timer_impl.dart (revision 8601)
+++ runtime/bin/timer_impl.dart (working copy)
@@ -185,3 +185,15 @@
bool _repeating;
}
+// Provide a closure which will allocate a Timer object to be able to hook
+// up the Timer interface in dart:isolate with the implementation here.
+_getTimerFactoryClosure() {
+ return (int milliSeconds, void callback(Timer timer), bool repeating) {
+ if (repeating) {
+ return new _Timer.repeating(milliSeconds, callback);
+ }
+ return new _Timer(milliSeconds, callback);
+ };
+}
+
+

Powered by Google App Engine
This is Rietveld 408576698