Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Unified Diff: runtime/vm/snapshot_test.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/math_patch.dart ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.dart
diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart
index 97a933ba652b911be181322f60f3e5e0f6165a39..7e6639d85f295282ae7a3f88ee815f2d7b269300 100644
--- a/runtime/vm/snapshot_test.dart
+++ b/runtime/vm/snapshot_test.dart
@@ -742,10 +742,10 @@ class BenchmarkBase {
static double measureFor(Function f, int timeMinimum) {
int time = 0;
int iter = 0;
- Date start = new Date.now();
+ DateTime start = new DateTime.now();
while (time < timeMinimum) {
f();
- time = (new Date.now().difference(start)).inMilliseconds;
+ time = (new DateTime.now().difference(start)).inMilliseconds;
iter++;
}
// Force double result by using a double constant.
@@ -1112,12 +1112,12 @@ class PingPongGame {
}
void evaluateRound() {
- int time = (new Date.now().difference(_start)).inMilliseconds;
+ int time = (new DateTime.now().difference(_start)).inMilliseconds;
if (!_warmedup && time < Benchmark1.WARMUP_TIME) {
startRound();
} else if (!_warmedup) {
_warmedup = true;
- _start = new Date.now();
+ _start = new DateTime.now();
_iterations = 0;
startRound();
} else if (_warmedup && time < Benchmark1.RUN_TIME) {
@@ -1141,7 +1141,7 @@ class PingPongGame {
evaluateRound();
}
});
- _start = new Date.now();
+ _start = new DateTime.now();
startRound();
}
@@ -1150,7 +1150,7 @@ class PingPongGame {
_ping.close();
}
- Date _start;
+ DateTime _start;
SendPort _pong;
SendPort _pingPort;
ReceivePort _ping;
« no previous file with comments | « runtime/lib/math_patch.dart ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698