Home
last modified time | relevance | path

Searched refs:tv_nsec (Results 1 – 25 of 78) sorted by relevance

1234

/system/logging/liblog/include/log/
Dlog_time.h29 #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/
Dtimetest.c23 ((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/
DtestUtil.c49 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/logging/liblog/
Dlog_time.cpp33 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()
Dpmsg_writer.cpp128 header.realtime.tv_nsec = ts->tv_nsec; in PmsgWrite()
224 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write()
228 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE) { in __android_log_pmsg_file_write()
Dlogprint.cpp495 entry->tv_nsec = buf->nsec; in android_log_processLogBuffer()
974 entry->tv_nsec = buf->nsec; in android_log_processBinaryLogBuffer()
1152 t->tv_nsec = 0; in readSeconds()
1155 t->tv_nsec += (*p - '0') * multiplier; in readSeconds()
1161 left->tv_nsec += right->tv_nsec; in sumTimespec()
1163 if (left->tv_nsec >= (long)NS_PER_SEC) { in sumTimespec()
1164 left->tv_nsec -= NS_PER_SEC; in sumTimespec()
1172 result->tv_nsec = left->tv_nsec - right->tv_nsec; in subTimespec()
1174 if (result->tv_nsec < 0) { in subTimespec()
1175 result->tv_nsec += NS_PER_SEC; in subTimespec()
[all …]
/system/media/audio_utils/
Decho_reference.c124 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()
292 (int)er->wr_render_time.tv_sec, (int)er->wr_render_time.tv_nsec, er->playback_delay); in echo_reference_write()
352 ts.tv_nsec += (timeoutMs%1000) * 1000000; in echo_reference_read()
353 if (ts.tv_nsec >= 1000000000) { in echo_reference_read()
354 ts.tv_nsec -= 1000000000; in echo_reference_read()
369 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/
DCondition.h129 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/logging/liblog/include_vndk/log/
Dlog_time.h38 #define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2))
42 uint32_t tv_nsec; member
/system/extras/tests/suspend_stress/
Dsuspend_stress.cpp37 (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/
Dclock.cc39 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/
Drun_and_sleep.cpp12 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/
Dpftest.c40 t.tv_sec = t.tv_nsec = 0; in stop_watch()
42 return t.tv_sec*1000000000ULL + t.tv_nsec; in stop_watch()
/system/memory/libdmabufheap/tests/
Ddmabuf_heap_bench.c161 start = ts_start.tv_sec * NSEC_PER_SEC + ts_start.tv_nsec; in ion_heap_bench()
162 end = ts_end.tv_sec * NSEC_PER_SEC + ts_end.tv_nsec; in ion_heap_bench()
188 start = ts_start.tv_sec * NSEC_PER_SEC + ts_start.tv_nsec; in dmabuf_heap_bench()
189 end = ts_end.tv_sec * NSEC_PER_SEC + ts_end.tv_nsec; in dmabuf_heap_bench()
/system/memory/lmkd/
Dwatchdog.cpp76 new_timer.it_value.tv_nsec = 0; in start()
78 new_timer.it_interval.tv_nsec = 0; in start()
/system/libfmq/
DEventFlag.cpp229 waitTime->tv_nsec += nanoSeconds % kNanosPerSecond; in addNanosecondsToCurrentTime()
231 if (waitTime->tv_nsec >= kNanosPerSecond) { in addNanosecondsToCurrentTime()
233 waitTime->tv_nsec -= kNanosPerSecond; in addNanosecondsToCurrentTime()
/system/chre/platform/linux/
Dsystem_timer.cc35 ts->tv_nsec = ns % kOneSecondInNanoseconds; in NanosecondsToTimespec()
113 isActive = (spec.it_value.tv_sec > 0 || spec.it_value.tv_nsec > 0); in isActive()
Dsystem_time.cc40 Nanoseconds(static_cast<uint64_t>(timeNow.tv_nsec)); in getMonotonicTime()
/system/logging/liblog/tests/
Dliblog_benchmark.cpp199 header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short()
285 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_aligned()
359 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_unaligned1()
433 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_long_aligned()
505 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_long_unaligned1()
/system/extras/simpleperf/demo/SimpleperfExampleCpp/app/src/main/cpp/
Dnative-lib.cpp64 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock()
79 req.tv_nsec = sleep_time_in_ns % 1000000000; in SleepFunction()
/system/chre/chpp/platform/linux/include/chpp/platform/
Dplatform_time.h29 ((uint64_t)time.tv_sec * CHPP_NSEC_PER_SEC + (uint64_t)time.tv_nsec)
/system/nfc/src/gki/ulinux/
Dgki_ulinux.cc395 delay.tv_nsec = 1000 * 1000 * (timeout % 1000); in timer_thread()
463 delay.tv_nsec = 1000 * 1000 * (LINUX_SEC % 1000); in GKI_run()
605 abstime.tv_nsec += nano_sec; in GKI_wait()
606 if (abstime.tv_nsec > NSEC_PER_SEC) { in GKI_wait()
607 abstime.tv_sec += (abstime.tv_nsec / NSEC_PER_SEC); in GKI_wait()
608 abstime.tv_nsec = abstime.tv_nsec % NSEC_PER_SEC; in GKI_wait()
688 delay.tv_nsec = 1000 * 1000 * (timeout % 1000); in GKI_delay()
/system/extras/memory_replay/
DUtils.h25 return static_cast<uint64_t>(t.tv_sec) * 1000000000LL + t.tv_nsec; in Nanotime()
/system/core/libutils/
DSystemClock.cpp75 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
/system/libbase/
Dchrono_utils.cpp29 std::chrono::nanoseconds(ts.tv_nsec)); in now()

1234