| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #import("dart:io"); |
| 6 |
| 5 class TimerTest { | 7 class TimerTest { |
| 6 | 8 |
| 7 static final int _STARTTIMEOUT = 1050; | 9 static final int _STARTTIMEOUT = 1050; |
| 8 static final int _DECREASE = 200; | 10 static final int _DECREASE = 200; |
| 9 static final int _ITERATIONS = 5; | 11 static final int _ITERATIONS = 5; |
| 10 | 12 |
| 11 static void testSimpleTimer() { | 13 static void testSimpleTimer() { |
| 12 | 14 |
| 13 void timeoutHandler(Timer timer) { | 15 void timeoutHandler(Timer timer) { |
| 14 int endTime = (new Date.now()).value; | 16 int endTime = (new Date.now()).value; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 32 } | 34 } |
| 33 | 35 |
| 34 static int _startTime; | 36 static int _startTime; |
| 35 static int _timeout; | 37 static int _timeout; |
| 36 static int _iteration; | 38 static int _iteration; |
| 37 } | 39 } |
| 38 | 40 |
| 39 main() { | 41 main() { |
| 40 TimerTest.testMain(); | 42 TimerTest.testMain(); |
| 41 } | 43 } |
| OLD | NEW |