| OLD | NEW |
| 1 part of dart.core; | 1 part of dart.core; |
| 2 | 2 |
| 3 class Stopwatch { | 3 class Stopwatch { |
| 4 int get frequency => _frequency; | 4 int get frequency => _frequency; |
| 5 num _start; | 5 num _start; |
| 6 num _stop; | 6 num _stop; |
| 7 Stopwatch() { | 7 Stopwatch() { |
| 8 _initTicker(); | 8 _initTicker(); |
| 9 } | 9 } |
| 10 void start() { | 10 void start() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return new Duration(microseconds: elapsedMicroseconds); | 39 return new Duration(microseconds: elapsedMicroseconds); |
| 40 } | 40 } |
| 41 int get elapsedMicroseconds { | 41 int get elapsedMicroseconds { |
| 42 return (elapsedTicks * 1000000) ~/ frequency; | 42 return (elapsedTicks * 1000000) ~/ frequency; |
| 43 } | 43 } |
| 44 int get elapsedMilliseconds { | 44 int get elapsedMilliseconds { |
| 45 return (elapsedTicks * 1000) ~/ frequency; | 45 return (elapsedTicks * 1000) ~/ frequency; |
| 46 } | 46 } |
| 47 bool get isRunning => _start != null && _stop == null; | 47 bool get isRunning => _start != null && _stop == null; |
| 48 static int _frequency; | 48 static int _frequency; |
| 49 @patch static void _initTicker() { | 49 static void _initTicker() { |
| 50 Primitives.initTicker(); | 50 Primitives.initTicker(); |
| 51 _frequency = DDC$RT.cast(Primitives.timerFrequency, dynamic, int, | 51 _frequency = DDC$RT.cast(Primitives.timerFrequency, dynamic, int, |
| 52 "CastGeneral", """line 140, column 18 of dart:core/stopwatch.dart: """, | 52 "CastGeneral", """line 143, column 18 of dart:core/stopwatch.dart: """, |
| 53 Primitives.timerFrequency is int, true); | 53 Primitives.timerFrequency is int, true); |
| 54 } | 54 } |
| 55 @patch static int _now() => ((__x35) => DDC$RT.cast(__x35, dynamic, int, | 55 static int _now() => ((__x35) => DDC$RT.cast(__x35, dynamic, int, |
| 56 "CastGeneral", """line 143, column 24 of dart:core/stopwatch.dart: """, | 56 "CastGeneral", """line 145, column 24 of dart:core/stopwatch.dart: """, |
| 57 __x35 is int, true))(Primitives.timerTicks()); | 57 __x35 is int, true))(Primitives.timerTicks()); |
| 58 } | 58 } |
| OLD | NEW |