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 |
+} |