diff options
author | Jerome Gaillard <jgaillard@google.com> | 2019-06-14 12:58:57 +0100 |
---|---|---|
committer | Jerome Gaillard <jgaillard@google.com> | 2019-06-14 12:07:36 +0000 |
commit | e218c6928508ef72de2cc5c8b89de0f250a3e68c (patch) | |
tree | 22713615fad3dda93063795c97b41f281b6ff745 /libs/hwui/renderthread/TimeLord.cpp | |
parent | f06c22660f41e307cb4a1a70ac9f93f490e68870 (diff) |
Replace CLOCK_MONOTONIC with SYSTEM_TIME_MONOTONIC
Using SYSTEM_TIME_MONOTONIC works for Android (where it translates to
CLOCK_MONOTONIC) and host targets, while CLOCK_MONOTONIC is not defined
on macOS.
Bug: 117921091
Test: existing tests should pass
Change-Id: I1fad472881830fb0701a320cf37319e083932ad4
Diffstat (limited to 'libs/hwui/renderthread/TimeLord.cpp')
-rw-r--r-- | libs/hwui/renderthread/TimeLord.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/TimeLord.cpp b/libs/hwui/renderthread/TimeLord.cpp index b82c5d159756..784068f1d877 100644 --- a/libs/hwui/renderthread/TimeLord.cpp +++ b/libs/hwui/renderthread/TimeLord.cpp @@ -31,7 +31,7 @@ bool TimeLord::vsyncReceived(nsecs_t vsync) { nsecs_t TimeLord::computeFrameTimeNanos() { // Logic copied from Choreographer.java - nsecs_t now = systemTime(CLOCK_MONOTONIC); + nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); nsecs_t jitterNanos = now - mFrameTimeNanos; if (jitterNanos >= mFrameIntervalNanos) { nsecs_t lastFrameOffset = jitterNanos % mFrameIntervalNanos; |