summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-01-29 18:31:51 -0800
committerJohn Reck <jreck@google.com>2014-01-29 19:59:16 -0800
commita6260b83da52b80438074a9fd207327d9e6e6d03 (patch)
treec0cb709f5fe6ffa22a885a49d9fc83939674e97f /libs/hwui/renderthread/RenderThread.cpp
parente0d1e295f15a5c70ca030732fd9309f0dc50b2cc (diff)
downloadframeworks_base-a6260b83da52b80438074a9fd207327d9e6e6d03.zip
frameworks_base-a6260b83da52b80438074a9fd207327d9e6e6d03.tar.gz
frameworks_base-a6260b83da52b80438074a9fd207327d9e6e6d03.tar.bz2
Fix nano vs. millis
Change-Id: I54f752bb7faab5fa66c36252c9f7cf8f5c9939c9
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index e4ec164..212f475 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -128,7 +128,8 @@ bool RenderThread::threadLoop() {
if (nextWakeup == LLONG_MAX) {
timeoutMillis = -1;
} else {
- timeoutMillis = nextWakeup - systemTime(SYSTEM_TIME_MONOTONIC);
+ nsecs_t timeoutNanos = nextWakeup - systemTime(SYSTEM_TIME_MONOTONIC);
+ timeoutMillis = nanoseconds_to_milliseconds(timeoutNanos);
if (timeoutMillis < 0) {
timeoutMillis = 0;
}
@@ -149,7 +150,7 @@ void RenderThread::queue(RenderTask* task) {
void RenderThread::queueDelayed(RenderTask* task, int delayMs) {
nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
- task->mRunAt = now + delayMs;
+ task->mRunAt = now + milliseconds_to_nanoseconds(delayMs);
queue(task);
}