OLD | NEW |
1 part of dart.async; | 1 part of dart.async; |
2 abstract class Timer {factory Timer(Duration duration, void callback()) { | 2 abstract class Timer {factory Timer(Duration duration, void callback()) { |
3 if (Zone.current == Zone.ROOT) { | 3 if (Zone.current == Zone.ROOT) { |
4 return Zone.current.createTimer(duration, callback); | 4 return Zone.current.createTimer(duration, callback); |
5 } | 5 } |
6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback,
runGuarded: true)); | 6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback,
runGuarded: true)); |
7 } | 7 } |
8 factory Timer.periodic(Duration duration, void callback(Timer timer)) { | 8 factory Timer.periodic(Duration duration, void callback(Timer timer)) { |
9 if (Zone.current == Zone.ROOT) { | 9 if (Zone.current == Zone.ROOT) { |
10 return Zone.current.createPeriodicTimer(duration, callback); | 10 return Zone.current.createPeriodicTimer(duration, callback); |
11 } | 11 } |
12 return Zone.current.createPeriodicTimer(duration, Zone.current.bindUnaryCallb
ack(DDC$RT.wrap((void f(Timer __u162)) { | 12 return Zone.current.createPeriodicTimer(duration, Zone.current.bindUnaryCallb
ack(DEVC$RT.wrap((void f(Timer __u162)) { |
13 void c(Timer x0) => f(DDC$RT.cast(x0, dynamic, Timer, "CastParam", """line 8
0, column 50 of dart:async/timer.dart: """, x0 is Timer, true)); | 13 void c(Timer x0) => f(DEVC$RT.cast(x0, dynamic, Timer, "CastParam", """line
80, column 50 of dart:async/timer.dart: """, x0 is Timer, true)); |
14 return f == null ? null : c; | 14 return f == null ? null : c; |
15 } | 15 } |
16 , callback, __t165, __t163, "Wrap", """line 80, column 50 of dart:async/timer.
dart: """, callback is __t163), runGuarded: true)); | 16 , callback, __t165, __t163, "Wrap", """line 80, column 50 of dart:async/timer.
dart: """, callback is __t163), runGuarded: true)); |
17 } | 17 } |
18 static void run(void callback()) { | 18 static void run(void callback()) { |
19 new Timer(Duration.ZERO, callback); | 19 new Timer(Duration.ZERO, callback); |
20 } | 20 } |
21 void cancel(); | 21 void cancel(); |
22 bool get isActive; | 22 bool get isActive; |
23 external static Timer _createTimer(Duration duration, void callback()); | 23 external static Timer _createTimer(Duration duration, void callback()); |
24 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim
er timer)); | 24 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim
er timer)); |
25 } | 25 } |
26 typedef dynamic __t163(dynamic __u164); | 26 typedef dynamic __t163(dynamic __u164); |
27 typedef void __t165(Timer __u166); | 27 typedef void __t165(Timer __u166); |
OLD | NEW |