/art/runtime/base/ |
H A D | time_utils.h | 66 static constexpr inline uint64_t NsToMs(uint64_t ns) { argument 67 return ns / 1000 / 1000; 81 void NanoSleep(uint64_t ns); 83 // Initialize a timespec to either a relative time (ms,ns), or to the absolute 85 void InitTimeSpec(bool absolute, int clock, int64_t ms, int32_t ns, timespec* ts);
|
H A D | time_utils.cc | 88 unit = "ns"; 169 void NanoSleep(uint64_t ns) { argument 171 tm.tv_sec = ns / MsToNs(1000); 172 tm.tv_nsec = ns - static_cast<uint64_t>(tm.tv_sec) * MsToNs(1000); 176 void InitTimeSpec(bool absolute, int clock, int64_t ms, int32_t ns, timespec* ts) { argument 200 ts->tv_nsec = (ts->tv_nsec + (ms % 1000) * 1000000) + ns;
|
H A D | mutex.cc | 615 bool ReaderWriterMutex::ExclusiveLockWithTimeout(Thread* self, int64_t ms, int32_t ns) { argument 620 InitTimeSpec(true, CLOCK_MONOTONIC, ms, ns, &end_abs_ts); 652 InitTimeSpec(true, CLOCK_REALTIME, ms, ns, &ts); 864 bool ConditionVariable::TimedWait(Thread* self, int64_t ms, int32_t ns) { argument 872 InitTimeSpec(false, CLOCK_REALTIME, ms, ns, &rel_ts); 905 InitTimeSpec(true, clock, ms, ns, &ts);
|
H A D | mutex.h | 177 // Sum of time waited by all contenders in ns. 308 bool ExclusiveLockWithTimeout(Thread* self, int64_t ms, int32_t ns) 400 bool TimedWait(Thread* self, int64_t ms, int32_t ns) NO_THREAD_SAFETY_ANALYSIS;
|
/art/runtime/native/ |
H A D | java_lang_Object.cc | 54 static void Object_waitJI(JNIEnv* env, jobject java_this, jlong ms, jint ns) { argument 57 o->Wait(soa.Self(), ms, ns);
|
H A D | java_lang_Thread.cc | 163 static void Thread_sleep(JNIEnv* env, jclass, jobject java_lock, jlong ms, jint ns) { argument 166 Monitor::Wait(Thread::Current(), lock, ms, ns, true, kSleeping); local
|
/art/runtime/ |
H A D | monitor.cc | 409 void Monitor::Wait(Thread* self, int64_t ms, int32_t ns, argument 425 if (why == kTimedWaiting && (ms == 0 && ns == 0)) { 430 if (ms < 0 || ns < 0 || ns > 999999) { 433 "timeout arguments out of range: ms=%" PRId64 " ns=%d", ms, ns); 488 self->GetWaitConditionVariable()->TimedWait(self, ms, ns); 835 void Monitor::Wait(Thread* self, mirror::Object *obj, int64_t ms, int32_t ns, argument 869 mon->Wait(self, ms, ns, interruptShouldThrow, why);
|
H A D | monitor.h | 82 static void Wait(Thread* self, mirror::Object* obj, int64_t ms, int32_t ns, 215 // Checks to make sure that "ns" is in the range 0-999999 (i.e. fractions of a millisecond) and
|
/art/runtime/mirror/ |
H A D | object-inl.h | 115 inline void Object::Wait(Thread* self, int64_t ms, int32_t ns) { argument 116 Monitor::Wait(self, this, ms, ns, true, kTimedWaiting);
|