diff options
author | Mathias Agopian <mathias@google.com> | 2017-02-28 15:06:51 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2017-03-03 14:47:47 -0800 |
commit | 22dbf3947fedf988e714a4703ddf85fc41413f90 (patch) | |
tree | ad823e9592de58265e4740a4d1ae251bfa260348 /libutils/Timers.cpp | |
parent | 6048d9db5f11045412504b533ea9a92a7df6354c (diff) |
clean-up libutils includes
moved Foo.h as first include of Foo.cpp, and
removed redundant includes.
Made NativeHandle non virtual.
Test: run & compile
Bug: n/a
Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a
Diffstat (limited to 'libutils/Timers.cpp')
-rw-r--r-- | libutils/Timers.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libutils/Timers.cpp b/libutils/Timers.cpp index 201bc412c..b2df9a58f 100644 --- a/libutils/Timers.cpp +++ b/libutils/Timers.cpp @@ -20,7 +20,6 @@ #include <utils/Timers.h> #include <limits.h> -#include <sys/time.h> #include <time.h> #if defined(__ANDROID__) @@ -53,7 +52,7 @@ nsecs_t systemTime(int /*clock*/) int toMillisecondTimeoutDelay(nsecs_t referenceTime, nsecs_t timeoutTime) { - int timeoutDelayMillis; + nsecs_t timeoutDelayMillis; if (timeoutTime > referenceTime) { uint64_t timeoutDelay = uint64_t(timeoutTime - referenceTime); if (timeoutDelay > uint64_t((INT_MAX - 1) * 1000000LL)) { @@ -64,5 +63,5 @@ int toMillisecondTimeoutDelay(nsecs_t referenceTime, nsecs_t timeoutTime) } else { timeoutDelayMillis = 0; } - return timeoutDelayMillis; + return (int)timeoutDelayMillis; } |