/system/core/liblog/include/log/ |
D | log_time.h | 29 #define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2)) 38 uint32_t tv_nsec = 0; member 44 : tv_sec(static_cast<uint32_t>(T.tv_sec)), tv_nsec(static_cast<uint32_t>(T.tv_nsec)) {} in log_time() 46 : tv_sec(sec), tv_nsec(nsec) { in tv_sec() 53 tv_nsec = static_cast<uint32_t>(T.tv_nsec); in log_time() 59 (tv_nsec == static_cast<uint32_t>(T.tv_nsec)); 67 (tv_nsec < static_cast<uint32_t>(T.tv_nsec))); 75 (tv_nsec > static_cast<uint32_t>(T.tv_nsec))); 83 return (tv_sec == T.tv_sec) && (tv_nsec == T.tv_nsec); 90 ((tv_sec == T.tv_sec) && (tv_nsec < T.tv_nsec)); [all …]
|
/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/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/core/liblog/ |
D | log_time.cpp | 33 tv_nsec = 0; in strptime() 103 tv_nsec = 0; in strptime() 107 tv_nsec = tv_nsec + (*ret - '0') * mul; in strptime() 126 tv_nsec = 0; in strptime()
|
D | pmsg_writer.cpp | 120 header.realtime.tv_nsec = ts->tv_nsec; in PmsgWrite() 216 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write() 220 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE) { in __android_log_pmsg_file_write()
|
D | logprint.cpp | 504 entry->tv_nsec = buf->nsec; in android_log_processLogBuffer() 983 entry->tv_nsec = buf->nsec; in android_log_processBinaryLogBuffer() 1161 t->tv_nsec = 0; in readSeconds() 1164 t->tv_nsec += (*p - '0') * multiplier; in readSeconds() 1170 left->tv_nsec += right->tv_nsec; in sumTimespec() 1172 if (left->tv_nsec >= (long)NS_PER_SEC) { in sumTimespec() 1173 left->tv_nsec -= NS_PER_SEC; in sumTimespec() 1181 result->tv_nsec = left->tv_nsec - right->tv_nsec; in subTimespec() 1183 if (result->tv_nsec < 0) { in subTimespec() 1184 result->tv_nsec += NS_PER_SEC; in subTimespec() [all …]
|
/system/media/audio_utils/ |
D | echo_reference.c | 124 er->wr_render_time.tv_nsec = 0; in echo_reference_reset_l() 156 (int)buffer->time_stamp.tv_nsec, er->playback_delay); in echo_reference_write() 161 if ((buffer->time_stamp.tv_sec == 0) && (buffer->time_stamp.tv_nsec == 0) && in echo_reference_write() 162 (er->wr_render_time.tv_sec == 0) && (er->wr_render_time.tv_nsec == 0)) { in echo_reference_write() 179 er->wr_render_time.tv_nsec = buffer->time_stamp.tv_nsec; in echo_reference_write() 280 (int)er->wr_render_time.tv_sec, (int)er->wr_render_time.tv_nsec, er->playback_delay); in echo_reference_write() 339 ts.tv_nsec += (timeoutMs%1000) * 1000000; in echo_reference_read() 340 if (ts.tv_nsec >= 1000000000) { in echo_reference_read() 341 ts.tv_nsec -= 1000000000; in echo_reference_read() 356 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/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/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/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/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/extras/memory_replay/ |
D | Utils.h | 25 return static_cast<uint64_t>(t.tv_sec) * 1000000000LL + t.tv_nsec; in Nanotime()
|
/system/core/libutils/ |
D | SystemClock.cpp | 68 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
|
/system/libbase/ |
D | chrono_utils.cpp | 29 std::chrono::nanoseconds(ts.tv_nsec)); in now()
|
/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()
|
/system/core/liblog/tests/ |
D | liblog_benchmark.cpp | 199 header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short() 286 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_aligned() 361 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_unaligned1() 436 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_long_aligned() 509 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_long_unaligned1()
|
/system/nfc/src/gki/ulinux/ |
D | gki_ulinux.cc | 390 delay.tv_nsec = 1000 * 1000 * (timeout % 1000); in timer_thread() 458 delay.tv_nsec = 1000 * 1000 * (LINUX_SEC % 1000); in GKI_run() 600 abstime.tv_nsec += nano_sec; in GKI_wait() 601 if (abstime.tv_nsec > NSEC_PER_SEC) { in GKI_wait() 602 abstime.tv_sec += (abstime.tv_nsec / NSEC_PER_SEC); in GKI_wait() 603 abstime.tv_nsec = abstime.tv_nsec % NSEC_PER_SEC; in GKI_wait() 683 delay.tv_nsec = 1000 * 1000 * (timeout % 1000); in GKI_delay()
|