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

Unified Diff: tools/bench_playback.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 | « src/ports/SkTime_win.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_playback.cpp
diff --git a/tools/bench_playback.cpp b/tools/bench_playback.cpp
index 534ad9682214cb38f91a76a01a6f785d1dfc9be7..a5dfe50973a211abf29e39640be93e245bc9cb3f 100644
--- a/tools/bench_playback.cpp
+++ b/tools/bench_playback.cpp
@@ -40,7 +40,7 @@
src.width() * sizeof(SkPMColor)));
canvas->clipRect(SkRect::MakeWH(SkIntToScalar(FLAGS_tile), SkIntToScalar(FLAGS_tile)));
- const SkNSec start = SkTime::GetNSecs();
+ const SkMSec start = SkTime::GetMSecs();
for (int i = 0; i < FLAGS_loops; i++) {
if (FLAGS_skr) {
SkRecordDraw(record, canvas.get());
@@ -49,9 +49,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("%6.2f\t%s\n", msPerLoop, name);
}
int tool_main(int argc, char** argv);
« no previous file with comments | « src/ports/SkTime_win.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698