/system/core/liblog/ |
D | log_time.cpp | 39 tv_nsec = 0; in strptime() 109 tv_nsec = 0; in strptime() 113 tv_nsec = tv_nsec + (*ret - '0') * mul; in strptime() 132 tv_nsec = 0; in strptime() 143 if (this->tv_nsec < (unsigned long int)T.tv_nsec) { in operator -=() 145 this->tv_nsec = NS_PER_SEC + this->tv_nsec - T.tv_nsec; in operator -=() 147 this->tv_nsec -= T.tv_nsec; in operator -=() 155 this->tv_nsec += (unsigned long int)T.tv_nsec; in operator +=() 156 if (this->tv_nsec >= NS_PER_SEC) { in operator +=() 157 this->tv_nsec -= NS_PER_SEC; in operator +=() [all …]
|
D | logprint.cpp | 501 entry->tv_nsec = buf->nsec; in android_log_processLogBuffer() 1008 entry->tv_nsec = buf->nsec; in android_log_processBinaryLogBuffer() 1253 t->tv_nsec = 0; in readSeconds() 1256 t->tv_nsec += (*p - '0') * multiplier; in readSeconds() 1262 left->tv_nsec += right->tv_nsec; in sumTimespec() 1264 if (left->tv_nsec >= (long)NS_PER_SEC) { in sumTimespec() 1265 left->tv_nsec -= NS_PER_SEC; in sumTimespec() 1273 result->tv_nsec = left->tv_nsec - right->tv_nsec; in subTimespec() 1275 if (result->tv_nsec < 0) { in subTimespec() 1276 result->tv_nsec += NS_PER_SEC; in subTimespec() [all …]
|
D | pmsg_writer.cpp | 148 header.realtime.tv_nsec = ts->tv_nsec; in pmsgWrite() 246 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write() 250 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE) { in __android_log_pmsg_file_write()
|
/system/extras/tests/timetest/ |
D | timetest.c | 23 ((long long) t.tv_nsec); in nanotime() 30 r.tv_nsec = a.tv_nsec - b.tv_nsec; in ts_sub() 31 if(r.tv_nsec < 0) { in ts_sub() 33 r.tv_nsec += 1000 * 1000 * 1000; in ts_sub() 35 if(r.tv_sec < 0 && r.tv_nsec > 0) { in ts_sub() 37 r.tv_nsec -= 1000 * 1000 * 1000; in ts_sub() 44 if(a.tv_sec < b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec < b.tv_nsec)) in ts_min() 52 if(a.tv_sec < b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec < b.tv_nsec)) in ts_max() 66 dtmin.tv_nsec = 0; in main() 68 dtminp.tv_nsec = 0; in main() [all …]
|
/system/core/liblog/include/log/ |
D | log_time.h | 32 #define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2)) 46 uint32_t tv_nsec = 0; member 54 : tv_sec(static_cast<uint32_t>(T.tv_sec)), tv_nsec(static_cast<uint32_t>(T.tv_nsec)) {} in log_time() 56 : tv_sec(sec), tv_nsec(nsec) { in tv_sec() 63 tv_nsec = static_cast<uint32_t>(T.tv_nsec); in log_time() 71 tv_nsec = c[4] | (static_cast<uint32_t>(c[5]) << 8) | in log_time() 79 (tv_nsec == static_cast<uint32_t>(T.tv_nsec)); 87 (tv_nsec < static_cast<uint32_t>(T.tv_nsec))); 95 (tv_nsec > static_cast<uint32_t>(T.tv_nsec))); 114 return (tv_sec == T.tv_sec) && (tv_nsec == T.tv_nsec); [all …]
|
/system/extras/tests/lib/testUtil/ |
D | testUtil.c | 49 rv += (double) val->tv_nsec / nSecsPerSec; in ts2double() 71 rv.tv_nsec = (amt - rv.tv_sec) * nSecsPerSec; in double2ts() 73 while ((unsigned) rv.tv_nsec >= nSecsPerSec) { in double2ts() 74 rv.tv_nsec -= nSecsPerSec; in double2ts() 107 assert(first->tv_nsec >= 0 && first->tv_nsec < nSecsPerSec); in tsDelta() 108 assert(second->tv_nsec >= 0 && second->tv_nsec < nSecsPerSec); in tsDelta() 110 if (second->tv_nsec >= first->tv_nsec) { in tsDelta() 111 rv.tv_nsec = second->tv_nsec - first->tv_nsec; in tsDelta() 113 rv.tv_nsec = (second->tv_nsec + nSecsPerSec) - first->tv_nsec; in tsDelta()
|
/system/media/audio_utils/ |
D | echo_reference.c | 123 er->wr_render_time.tv_nsec = 0; in echo_reference_reset_l() 155 (int)buffer->time_stamp.tv_nsec, er->playback_delay); in echo_reference_write() 160 if ((buffer->time_stamp.tv_sec == 0) && (buffer->time_stamp.tv_nsec == 0) && in echo_reference_write() 161 (er->wr_render_time.tv_sec == 0) && (er->wr_render_time.tv_nsec == 0)) { in echo_reference_write() 178 er->wr_render_time.tv_nsec = buffer->time_stamp.tv_nsec; in echo_reference_write() 279 (int)er->wr_render_time.tv_sec, (int)er->wr_render_time.tv_nsec, er->playback_delay); in echo_reference_write() 338 ts.tv_nsec += (timeoutMs%1000) * 1000000; in echo_reference_read() 339 if (ts.tv_nsec >= 1000000000) { in echo_reference_read() 340 ts.tv_nsec -= 1000000000; in echo_reference_read() 355 if ((er->wr_render_time.tv_sec == 0 && er->wr_render_time.tv_nsec == 0) || in echo_reference_read() [all …]
|
/system/core/libutils/include/utils/ |
D | Condition.h | 129 ts.tv_nsec = t.tv_usec*1000; in waitRelative() 135 ts.tv_nsec += static_cast<long>(reltime%1000000000); in waitRelative() 136 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) { in waitRelative() 137 ts.tv_nsec -= 1000000000; in waitRelative()
|
/system/core/liblog/include_vndk/log/ |
D | log_time.h | 38 #define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2)) 42 uint32_t tv_nsec; member
|
/system/connectivity/wifilogd/ |
D | os.cpp | 58 CHECK(now_timespec.tv_nsec <= kMaxNanoSeconds); in GetTimestamp() 69 SAFELY_CLAMP(now_timespec.tv_nsec, uint32_t, 0, kMaxNanoSeconds); in GetTimestamp() 76 SAFELY_CLAMP(sleep_time_nsec, decltype(timespec::tv_nsec), 0, kMaxNanos)}; in Nanosleep() 83 } while (failed && errno == EINTR && sleep_timespec.tv_nsec > 0); in Nanosleep()
|
/system/extras/tests/suspend_stress/ |
D | suspend_stress.cpp | 37 (a->tv_nsec - b->tv_nsec); in timediff_ns() 182 actual_time.tv_nsec / NSEC_PER_MSEC, in main() 187 actual_time.tv_nsec / NSEC_PER_MSEC, in main()
|
/system/core/libutils/ |
D | Timers.cpp | 36 t.tv_sec = t.tv_nsec = 0; in systemTime() 38 return nsecs_t(t.tv_sec)*1000000000LL + t.tv_nsec; in systemTime()
|
D | SystemClock.cpp | 68 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
|
/system/extras/simpleperf/runtest/ |
D | run_and_sleep.cpp | 12 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock() 27 req.tv_nsec = sleep_time_in_ns % 1000000000; in SleepFunction()
|
/system/update_engine/common/ |
D | clock.cc | 39 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetMonotonicTime() 54 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetBootTime()
|
/system/extras/tests/pftest/ |
D | pftest.c | 40 t.tv_sec = t.tv_nsec = 0; in stop_watch() 42 return t.tv_sec*1000000000ULL + t.tv_nsec; in stop_watch()
|
/system/bt/common/ |
D | time_util_unittest.cc | 73 delay.tv_nsec = 1000 * 1000 * (TEST_TIME_SLEEP_MS % 1000); in TEST() 94 delay.tv_nsec = 1000 * (TEST_TIME_SLEEP_US % (1000 * 1000)); in TEST() 135 delay.tv_nsec = 1000 * (TEST_TIME_SLEEP_US % (1000 * 1000)); in TEST()
|
D | time_util.cc | 35 ((uint64_t)ts_now.tv_nsec / 1000); in time_get_os_boottime_us()
|
/system/core/logd/ |
D | LogTimes.cpp | 45 mTimeout.tv_nsec = timeout % NS_PER_SEC; in LogTimeEntry() 87 if (me->mTimeout.tv_sec || me->mTimeout.tv_nsec) { in threadStart() 91 me->mTimeout.tv_nsec = 0; in threadStart() 122 if (!me->mTimeout.tv_sec && !me->mTimeout.tv_nsec) { in threadStart()
|
/system/netd/resolv/ |
D | res_send.cpp | 147 x.tv_nsec = nsec; in evConsTime() 155 x.tv_nsec = addend1.tv_nsec + addend2.tv_nsec; in evAddTime() 156 if (x.tv_nsec >= BILLION) { in evAddTime() 158 x.tv_nsec -= BILLION; in evAddTime() 167 if (minuend.tv_nsec >= subtrahend.tv_nsec) in evSubTime() 168 x.tv_nsec = minuend.tv_nsec - subtrahend.tv_nsec; in evSubTime() 170 x.tv_nsec = BILLION - subtrahend.tv_nsec + minuend.tv_nsec; in evSubTime() 183 n = a.tv_nsec - b.tv_nsec; in evCmpTime() 703 result.tv_nsec = (msec % 1000) * 1000000; in get_timeout()
|
/system/core/lmkd/ |
D | statslog.c | 25 t.tv_sec = t.tv_nsec = 0; in getElapsedRealTimeNs() 27 return (int64_t)t.tv_sec * 1000000000LL + t.tv_nsec; in getElapsedRealTimeNs()
|
/system/chre/platform/linux/ |
D | system_timer.cc | 34 ts->tv_nsec = ns % kOneSecondInNanoseconds; in NanosecondsToTimespec() 112 isActive = (spec.it_value.tv_sec > 0 || spec.it_value.tv_nsec > 0); in isActive()
|
D | system_time.cc | 40 + Nanoseconds(static_cast<uint64_t>(timeNow.tv_nsec)); in getMonotonicTime()
|
/system/extras/simpleperf/demo/SimpleperfExampleWithNative/app/src/main/cpp/ |
D | native-lib.cpp | 67 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock() 82 req.tv_nsec = sleep_time_in_ns % 1000000000; in SleepFunction()
|
/system/libfmq/ |
D | EventFlag.cpp | 265 waitTime->tv_nsec += nanoSeconds % kNanosPerSecond; in addNanosecondsToCurrentTime() 267 if (waitTime->tv_nsec >= kNanosPerSecond) { in addNanosecondsToCurrentTime() 269 waitTime->tv_nsec -= kNanosPerSecond; in addNanosecondsToCurrentTime()
|