Index: tests/compiler/dart2js_extra/timer_test.dart |
diff --git a/tests/compiler/dart2js_extra/timer_test.dart b/tests/compiler/dart2js_extra/timer_test.dart |
index 411be084d63d1c2651f3971d3d18386bea0cfc66..818a6aef2f7c41c0b0ca05a8119a37ecc6df1088 100644 |
--- a/tests/compiler/dart2js_extra/timer_test.dart |
+++ b/tests/compiler/dart2js_extra/timer_test.dart |
@@ -8,16 +8,17 @@ import 'dart:isolate'; |
import 'async_helper.dart'; |
void test(void onDone(bool success)) { |
+ Duration ms = const Duration(milliseconds: 1); |
int expected = 4; |
- void timerCallback(timer) { |
+ void timerCallback() { |
if (--expected == 0) onDone(true); |
} |
- new Timer(0, timerCallback); |
- new Timer(10, timerCallback); |
- new Timer(100, timerCallback); |
- new Timer(1000, timerCallback); |
+ new Timer(ms * 0, timerCallback); |
+ new Timer(ms * 10, timerCallback); |
+ new Timer(ms * 100, timerCallback); |
+ new Timer(ms * 1000, timerCallback); |
} |
main() { |