diff options
author | 2017-12-21 17:07:11 -0800 | |
---|---|---|
committer | 2017-12-22 10:11:39 -0800 | |
commit | 55256cb60e11d4fac71affb4b9760a2931a3598d (patch) | |
tree | fc1ed6885b013e0aa2bcfd9ef4dd94fec29bd382 /runtime/base/time_utils.h | |
parent | 64bae9fb677aa0e2406d13ea9f8ebaa92e16f978 (diff) |
Extensions to check JNI.
Ensure critical lock isn't held when returning from a down-call.
Log a warning if the critical lock is held for a significant period of
time.
Refactor JNIEnvExt to be a class rather than a struct.
Test: mma test-art-host
Change-Id: I4d149cb04d3a7308a22b92b196e51e2f1ae17ede
Diffstat (limited to 'runtime/base/time_utils.h')
-rw-r--r-- | runtime/base/time_utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/base/time_utils.h b/runtime/base/time_utils.h index 919937f5ba..7648a109fa 100644 --- a/runtime/base/time_utils.h +++ b/runtime/base/time_utils.h @@ -76,6 +76,15 @@ static constexpr inline uint64_t MsToNs(uint64_t ms) { return ms * 1000 * 1000; } +// Converts the given number of milliseconds to microseconds +static constexpr inline uint64_t MsToUs(uint64_t ms) { + return ms * 1000; +} + +static constexpr inline uint64_t UsToNs(uint64_t us) { + return us * 1000; +} + #if defined(__APPLE__) #ifndef CLOCK_REALTIME // No clocks to specify on OS/X < 10.12, fake value to pass to routines that require a clock. |