Index: tests/corelib/stopwatch_test.dart |
diff --git a/tests/corelib/stopwatch_test.dart b/tests/corelib/stopwatch_test.dart |
index e942ea8ecf7556a9c9caa751e674dfab6b9fafe3..48141a3e6963095ddce60a4a23e54ea1c64d0ee4 100644 |
--- a/tests/corelib/stopwatch_test.dart |
+++ b/tests/corelib/stopwatch_test.dart |
@@ -12,36 +12,36 @@ class StopwatchTest { |
sw.start(); |
for (int i = 0; i < 10000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > 0) { |
+ if (sw.elapsedTicks > 0) { |
break; |
} |
} |
- return sw.elapsed() > 0; |
+ return sw.elapsedTicks > 0; |
} |
static bool checkStopping(Stopwatch sw) { |
sw.stop(); |
- int v1 = sw.elapsed(); |
+ int v1 = sw.elapsedTicks; |
Expect.isTrue(v1 > 0); // Expect a non-zero elapsed time. |
Stopwatch sw2 = new Stopwatch(); // Used for verification. |
sw2.start(); |
int sw2LastElapsed = 0; |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- int v2 = sw.elapsed(); |
+ int v2 = sw.elapsedTicks; |
if (v1 != v2) { |
return false; |
} |
// If sw2 elapsed twice then sw must have advanced too if it wasn't |
// stopped. |
- if (sw2LastElapsed > 0 && sw2.elapsed() > sw2LastElapsed) { |
+ if (sw2LastElapsed > 0 && sw2.elapsedTicks > sw2LastElapsed) { |
break; |
} |
- sw2LastElapsed = sw2.elapsed(); |
+ sw2LastElapsed = sw2.elapsedTicks; |
} |
// The test only makes sense if measureable time elapsed and elapsed time |
// on the stopped Stopwatch did not increase. |
- Expect.isTrue(sw2.elapsed() > 0); |
+ Expect.isTrue(sw2.elapsedTicks > 0); |
return true; |
} |
@@ -50,21 +50,21 @@ class StopwatchTest { |
sw.start(); |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > 0) { |
+ if (sw.elapsedTicks > 0) { |
break; |
} |
} |
sw.stop(); |
- int initial = sw.elapsed(); |
+ int initial = sw.elapsedTicks; |
sw.start(); |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > initial) { |
+ if (sw.elapsedTicks > initial) { |
break; |
} |
} |
sw.stop(); |
- Expect.isTrue(sw.elapsed() > initial); |
+ Expect.isTrue(sw.elapsedTicks > initial); |
} |
static checkReset() { |
@@ -72,29 +72,29 @@ class StopwatchTest { |
sw.start(); |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > 0) { |
+ if (sw.elapsedTicks > 0) { |
break; |
} |
} |
sw.stop(); |
sw.reset(); |
- Expect.equals(0, sw.elapsed()); |
+ Expect.equals(0, sw.elapsedTicks); |
sw.start(); |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > 0) { |
+ if (sw.elapsedTicks > 0) { |
break; |
} |
} |
sw.reset(); |
for (int i = 0; i < 100000; i++) { |
parseInt(i.toString()); |
- if (sw.elapsed() > 0) { |
+ if (sw.elapsedTicks > 0) { |
break; |
} |
} |
sw.stop(); |
- Expect.isTrue(sw.elapsed() > 0); |
+ Expect.isTrue(sw.elapsedTicks > 0); |
} |
static testMain() { |