OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #library('multiple_timer_test'); | 5 library multiple_timer_test; |
6 | 6 |
7 #import("dart:isolate"); | 7 import 'dart:isolate'; |
8 #import('../../pkg/unittest/unittest.dart'); | 8 import '../../pkg/unittest/lib/unittest.dart'; |
9 | 9 |
10 const int TIMEOUT1 = 1000; | 10 const int TIMEOUT1 = 1000; |
11 const int TIMEOUT2 = 2000; | 11 const int TIMEOUT2 = 2000; |
12 const int TIMEOUT3 = 500; | 12 const int TIMEOUT3 = 500; |
13 const int TIMEOUT4 = 1500; | 13 const int TIMEOUT4 = 1500; |
14 | 14 |
15 main() { | 15 main() { |
16 test("multiple timer test", () { | 16 test("multiple timer test", () { |
17 int _startTime1; | 17 int _startTime1; |
18 int _startTime2; | 18 int _startTime2; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 _startTime1 = (new Date.now()).millisecondsSinceEpoch; | 59 _startTime1 = (new Date.now()).millisecondsSinceEpoch; |
60 new Timer(TIMEOUT1, expectAsync1(timeoutHandler1)); | 60 new Timer(TIMEOUT1, expectAsync1(timeoutHandler1)); |
61 _startTime2 = (new Date.now()).millisecondsSinceEpoch; | 61 _startTime2 = (new Date.now()).millisecondsSinceEpoch; |
62 new Timer(TIMEOUT2, expectAsync1(timeoutHandler2)); | 62 new Timer(TIMEOUT2, expectAsync1(timeoutHandler2)); |
63 _startTime3 = (new Date.now()).millisecondsSinceEpoch; | 63 _startTime3 = (new Date.now()).millisecondsSinceEpoch; |
64 new Timer(TIMEOUT3, expectAsync1(timeoutHandler3)); | 64 new Timer(TIMEOUT3, expectAsync1(timeoutHandler3)); |
65 _startTime4 = (new Date.now()).millisecondsSinceEpoch; | 65 _startTime4 = (new Date.now()).millisecondsSinceEpoch; |
66 new Timer(TIMEOUT4, expectAsync1(timeoutHandler4)); | 66 new Timer(TIMEOUT4, expectAsync1(timeoutHandler4)); |
67 }); | 67 }); |
68 } | 68 } |
OLD | NEW |