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

Unified Diff: src/ports/SkTime_win.cpp

Issue 250243002: Add nanosecond timer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sigh, just use %u 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_Unix.cpp ('k') | tools/bench_playback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkTime_win.cpp
diff --git a/src/ports/SkTime_win.cpp b/src/ports/SkTime_win.cpp
index 37af9f29f5bb2102c3ef5e44dc28c5872d4403c8..a48a69e88e81ae86330e5236feb2cdac820ea3a8 100644
--- a/src/ports/SkTime_win.cpp
+++ b/src/ports/SkTime_win.cpp
@@ -9,8 +9,7 @@
#include "SkTime.h"
-void SkTime::GetDateTime(DateTime* dt)
-{
+void SkTime::GetDateTime(DateTime* dt) {
if (dt)
{
SYSTEMTIME st;
@@ -26,13 +25,12 @@ void SkTime::GetDateTime(DateTime* dt)
}
}
-SkMSec SkTime::GetMSecs()
-{
+SkNSec SkTime::GetNSecs() {
FILETIME ft;
LARGE_INTEGER li;
GetSystemTimeAsFileTime(&ft);
li.LowPart = ft.dwLowDateTime;
li.HighPart = ft.dwHighDateTime;
__int64 t = li.QuadPart; /* In 100-nanosecond intervals */
- return (SkMSec)(t / 10000); /* In milliseconds */
+ return (SkMSec)(t * 100);
}
« no previous file with comments | « src/ports/SkTime_Unix.cpp ('k') | tools/bench_playback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698