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

Unified Diff: src/ports/SkTime_Unix.cpp

Issue 1422623003: Revert of SkTime::GetNSecs() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/core/SkTime.cpp ('k') | src/ports/SkTime_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkTime_Unix.cpp
diff --git a/src/ports/SkTime_Unix.cpp b/src/ports/SkTime_Unix.cpp
index 1ea3b8fbd0f5a1cb69a8c4906dd161ca507d1ef1..ec96bb8a90d3150dafa294ee08d04c741dd3e191 100644
--- a/src/ports/SkTime_Unix.cpp
+++ b/src/ports/SkTime_Unix.cpp
@@ -34,3 +34,10 @@
dt->fSecond = SkToU8(tstruct->tm_sec);
}
}
+
+SkMSec SkTime::GetMSecs()
+{
+ struct timeval tv;
+ gettimeofday(&tv, nullptr);
+ return (SkMSec) (tv.tv_sec * 1000 + tv.tv_usec / 1000 ); // microseconds to milliseconds
+}
« no previous file with comments | « src/core/SkTime.cpp ('k') | src/ports/SkTime_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698