diff options
| author | 2011-05-25 14:31:50 -0700 | |
|---|---|---|
| committer | 2011-05-25 14:31:50 -0700 | |
| commit | 85a7f99cfe066f054d4ddf4feb737f0395c9943b (patch) | |
| tree | 81b8d97282af4f13966734ffaadd96a8f7ce1e6c /services/input/InputDispatcher.cpp | |
| parent | 94e838f6e113f8cad30086a18f68da99976101d0 (diff) | |
| parent | 68d6075b4ad2205c10064c78cde552e3210cca91 (diff) | |
Merge "Refactor how timeouts are calculated. (DO NOT MERGE)" into honeycomb-mr2
Diffstat (limited to 'services/input/InputDispatcher.cpp')
| -rw-r--r-- | services/input/InputDispatcher.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 53dc769309dd..ce8f076707a9 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -246,15 +246,7 @@ void InputDispatcher::dispatchOnce() { // Wait for callback or timeout or wake. (make sure we round up, not down) nsecs_t currentTime = now(); - int32_t timeoutMillis; - if (nextWakeupTime > currentTime) { - uint64_t timeout = uint64_t(nextWakeupTime - currentTime); - timeout = (timeout + 999999LL) / 1000000LL; - timeoutMillis = timeout > INT_MAX ? -1 : int32_t(timeout); - } else { - timeoutMillis = 0; - } - + int timeoutMillis = toMillisecondTimeoutDelay(currentTime, nextWakeupTime); mLooper->pollOnce(timeoutMillis); } |