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

Unified Diff: tools/bench_record.cpp

Issue 258703002: Revert of Add nanosecond timer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | « tools/bench_playback.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_record.cpp
diff --git a/tools/bench_record.cpp b/tools/bench_record.cpp
index 712f63a6a30d5b698baef63dd02163a99cdc6cb2..63139d69fd3379d2c27f53107731ae1d859696ea 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -56,7 +56,7 @@
}
static void bench_record(SkPicture* src, const char* name, SkBBHFactory* bbhFactory) {
- const SkNSec start = SkTime::GetNSecs();
+ const SkMSec start = SkTime::GetMSecs();
const int width = src ? src->width() : FLAGS_nullSize;
const int height = src ? src->height() : FLAGS_nullSize;
@@ -80,9 +80,9 @@
}
}
- const SkNSec elapsed = SkTime::GetNSecs() - start;
- const double nsPerLoop = elapsed / (double)FLAGS_loops;
- printf("%u\t%s\n", SkToUInt(nsPerLoop), name);
+ const SkMSec elapsed = SkTime::GetMSecs() - start;
+ const double msPerLoop = elapsed / (double)FLAGS_loops;
+ printf("%.2g\t%s\n", msPerLoop, name);
}
int tool_main(int argc, char** argv);
« no previous file with comments | « tools/bench_playback.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698