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

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
« no previous file with comments | « runtime/bin/timer.dart ('k') | runtime/lib/isolate_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/timer_impl.dart
===================================================================
--- runtime/bin/timer_impl.dart (revision 8985)
+++ runtime/bin/timer_impl.dart (working copy)
@@ -186,3 +186,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);
+ };
+}
+
+
« 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