Home
last modified time | relevance | path

Searched refs:tv_sec (Results 1 – 25 of 111) sorted by relevance

12345

/system/core/include/log/
Dlog_read.h33 uint32_t tv_sec; // good to Feb 5 2106
41 tv_sec = T.tv_sec; in log_time()
46 tv_sec = sec; in log_time()
57 tv_sec = T.tv_sec; in log_time()
63 tv_sec = c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24); in log_time()
70 return (tv_sec == static_cast<uint32_t>(T.tv_sec))
79 return (tv_sec < static_cast<uint32_t>(T.tv_sec))
80 || ((tv_sec == static_cast<uint32_t>(T.tv_sec))
89 return (tv_sec > static_cast<uint32_t>(T.tv_sec))
90 || ((tv_sec == static_cast<uint32_t>(T.tv_sec))
[all …]
/system/extras/tests/timetest/
Dtimetest.c22 return (((long long) t.tv_sec) * 1000000000LL) + in nanotime()
29 r.tv_sec = a.tv_sec - b.tv_sec; in ts_sub()
32 r.tv_sec--; in ts_sub()
35 if(r.tv_sec < 0 && r.tv_nsec > 0) { in ts_sub()
36 r.tv_sec++; 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()
65 dtmin.tv_sec = INT_MAX; in main()
67 dtminp.tv_sec = INT_MAX; in main()
69 dtmax.tv_sec = 0; in main()
[all …]
/system/core/liblog/
Dlog_time.cpp35 now = tv_sec; in strptime()
38 tv_sec = now; in strptime()
76 tv_sec = 0; in strptime()
78 tv_sec = tv_sec * 10 + *ret - '0'; in strptime()
81 now = tv_sec; in strptime()
122 tv_sec = mktime(ptm); in strptime()
131 tv_sec = now; in strptime()
144 --this->tv_sec; in operator -=()
149 this->tv_sec -= T.tv_sec; in operator -=()
158 ++this->tv_sec; in operator +=()
[all …]
Dlogprint.c465 entry->tv_sec = buf->sec; in android_log_processLogBuffer()
763 entry->tv_sec = buf->sec; in android_log_processBinaryLogBuffer()
981 t->tv_sec = strtoul(e, &p, 10); in readSeconds()
997 left->tv_sec += right->tv_sec; in sumTimespec()
1000 left->tv_sec += 1; in sumTimespec()
1010 result->tv_sec = left->tv_sec - right->tv_sec; in subTimespec()
1013 result->tv_sec -= 1; in subTimespec()
1020 return (long long)now->tv_sec * NS_PER_SEC + now->tv_nsec; in nsecTimespec()
1121 time.tv_sec = mktime(&tm); in convertMonotonic()
1141 &suspended_monotonic)->tv_sec > 0) { in convertMonotonic()
[all …]
/system/connectivity/shill/net/
Devent_history_unittest.cc87 struct timeval monotonic = {.tv_sec = monotonic_seconds, .tv_usec = 0}; in GetTimestamp()
88 struct timeval boottime = {.tv_sec = boottime_seconds, .tv_usec = 0}; in GetTimestamp()
110 EXPECT_EQ(kTime1, GetEvents()->back().monotonic.tv_sec); in TEST_F()
111 EXPECT_EQ(kTime1, GetEvents()->back().boottime.tv_sec); in TEST_F()
116 EXPECT_EQ(kTime2, GetEvents()->back().monotonic.tv_sec); in TEST_F()
117 EXPECT_EQ(kTime2, GetEvents()->back().boottime.tv_sec); in TEST_F()
131 EXPECT_EQ(kTime1, GetEvents()->back().monotonic.tv_sec); in TEST_F()
132 EXPECT_EQ(kTime1, GetEvents()->back().boottime.tv_sec); in TEST_F()
138 EXPECT_EQ(kTime2, GetEvents()->back().monotonic.tv_sec); in TEST_F()
139 EXPECT_EQ(kTime2, GetEvents()->back().boottime.tv_sec); in TEST_F()
[all …]
Dshill_time.cc53 *seconds = now.tv_sec; in GetSecondsMonotonic()
63 *seconds = now.tv_sec; in GetSecondsBoottime()
74 tv->tv_sec = ts.tv_sec; in GetTimeMonotonic()
85 tv->tv_sec = ts.tv_sec; in GetTimeBoottime()
104 localtime_r(&now_wall_clock.tv_sec, &local_time); in GetNow()
/system/extras/tests/lib/testUtil/
DtestUtil.c51 rv = val->tv_sec; in ts2double()
62 rv = val->tv_sec; in tv2double()
73 rv.tv_sec = floor(amt); in double2ts()
74 rv.tv_nsec = (amt - rv.tv_sec) * nSecsPerSec; in double2ts()
78 rv.tv_sec++; in double2ts()
89 rv.tv_sec = floor(amt); in double2tv()
90 rv.tv_usec = (amt - rv.tv_sec) * uSecsPerSec; in double2tv()
94 rv.tv_sec++; in double2tv()
112 rv.tv_sec = second->tv_sec - first->tv_sec; in tsDelta()
117 rv.tv_sec--; in tsDelta()
[all …]
/system/core/logd/
DLogBuffer.h48 if (mono.tv_sec >= EPOCH_PLUS_2_YEARS) { in isMonotonic()
55 if (now.tv_sec >= EPOCH_PLUS_2_YEARS) { in isMonotonic()
60 if (now.tv_sec < EPOCH_PLUS_MINUTE) { in isMonotonic()
66 if ((cpu.tv_sec + EPOCH_PLUS_MINUTE) >= now.tv_sec) { in isMonotonic()
71 return mono.tv_sec < ((cpu.tv_sec + now.tv_sec) / 2); in isMonotonic()
DLogTimes.cpp46 mTimeout.tv_sec = timeout / NS_PER_SEC; in LogTimeEntry()
139 if (me->mTimeout.tv_sec || me->mTimeout.tv_nsec) { in threadStart()
143 me->mTimeout.tv_sec = 0; in threadStart()
174 if (!me->mTimeout.tv_sec && !me->mTimeout.tv_nsec) { in threadStart()
/system/extras/tests/icachetest/
Dicache_main.c22 t = (tm.tv_sec*1000000LL+tm.tv_usec) - (now.tv_sec*1000000LL+now.tv_usec); in main()
29 t = (tm.tv_sec*1000000LL+tm.tv_usec) - (now.tv_sec*1000000LL+now.tv_usec); in main()
/system/core/libutils/
DTimers.cpp37 t.tv_sec = t.tv_nsec = 0; in systemTime()
39 return nsecs_t(t.tv_sec)*1000000000LL + t.tv_nsec; in systemTime()
48 t.tv_sec = t.tv_usec = 0; in systemTime()
50 return nsecs_t(t.tv_sec)*1000000000LL + nsecs_t(t.tv_usec)*1000LL; in systemTime()
/system/update_engine/common/
Dclock.cc38 now_tv.tv_sec = now_ts.tv_sec; in GetMonotonicTime()
53 now_tv.tv_sec = now_ts.tv_sec; in GetBootTime()
/system/extras/crypto-perf/
Dcrypto.cpp134 elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec); in main()
139 (elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec)); in main()
143 ((elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec) * in main()
157 elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec); in main()
162 (elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec)); in main()
166 ((elapsed_time.tv_sec * USEC_PER_SEC + elapsed_time.tv_usec) * in main()
/system/core/include/utils/
DCondition.h111 ts.tv_sec = reltime/1000000000; in waitRelative()
122 ts.tv_sec = t.tv_sec; in waitRelative()
125 ts.tv_sec += reltime/1000000000; in waitRelative()
129 ts.tv_sec += 1; in waitRelative()
/system/media/audio_utils/
Decho_reference.c122 er->wr_render_time.tv_sec = 0; in echo_reference_reset_l()
154 (int)buffer->time_stamp.tv_sec, 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()
177 er->wr_render_time.tv_sec = buffer->time_stamp.tv_sec; 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()
339 ts.tv_sec += timeoutMs/1000; in echo_reference_read()
343 ts.tv_sec += 1; in echo_reference_read()
361 if ((er->wr_render_time.tv_sec == 0 && er->wr_render_time.tv_nsec == 0) || in echo_reference_read()
362 (buffer->time_stamp.tv_sec == 0 && buffer->time_stamp.tv_nsec == 0)) { in echo_reference_read()
[all …]
/system/extras/tests/suspend_stress/
Dsuspend_stress.cpp36 return ((long long)(a->tv_sec - b->tv_sec)) * NSEC_PER_SEC + in timediff_ns()
101 delay.it_value.tv_sec = alarm_time; in main()
134 expected_time.tv_sec += alarm_time; in main()
182 (long long)actual_time.tv_sec, in main()
187 (long long)actual_time.tv_sec, in main()
/system/extras/tests/ext4/
Drand_emmc_perf.c78 fprintf(full_stats, "%lld\n", (t.tv_sec * 1000000LL) + t.tv_usec); in print_stats()
87 max_usecs = (max.tv_sec * 1000000LL) + max.tv_usec; in print_stats()
88 total_usecs = (sum.tv_sec * 1000000LL) + sum.tv_usec; in print_stats()
101 x = (t.tv_sec * 1000000LL) + t.tv_usec; /* Convert to long long */ in print_stats()
153 res.tv_sec = 0; in perf_test()
155 while (res.tv_sec < TEST_LEN) { in perf_test()
179 msecs = (res.tv_sec * 1000) + (res.tv_usec / 1000); in perf_test()
/system/connectivity/shill/
Dipconfig.cc153 new_expiration_time.tv_sec += new_lease_duration; in UpdateLeaseExpirationTime()
162 if (current_lease_expiration_time_.tv_sec == kDefaultLeaseExpirationTime) { in TimeToLeaseExpiry()
168 if (now.tv_sec > current_lease_expiration_time_.tv_sec) { in TimeToLeaseExpiry()
172 *time_left = current_lease_expiration_time_.tv_sec - now.tv_sec; in TimeToLeaseExpiry()
Dportal_detector.cc169 << elapsed_time.tv_sec << " seconds."; in AdjustStartDelay()
170 if (elapsed_time.tv_sec < kMinTimeBetweenAttemptsSeconds) { in AdjustStartDelay()
172 elapsed_time.tv_sec; in AdjustStartDelay()
/system/extras/tests/sdcard/
Dstopwatch.cpp62 mStart.tv_sec = 0; in StopWatch()
136 long second = mData[i * 2].mTime.tv_sec - mStart.tv_sec; in sprint()
172 long second = mData[i + 1].mTime.tv_sec - mData[i].mTime.tv_sec; in processSamples()
211 double val = double(time.tv_nsec) / 1.0e9 + double(time.tv_sec); in timespecToDouble()
/system/extras/tests/schedtest/
Dschedtest.c37 long usec = (tv2.tv_sec - tv1.tv_sec) * 1000000 + tv2.tv_usec - tv1.tv_usec; in main()
/system/core/liblog/tests/
Dliblog_benchmark.cpp135 header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short()
222 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short_aligned()
298 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short_unaligned1()
374 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_long_aligned()
447 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_long_unaligned1()
/system/security/keystore/
Dkeystore_keymaster_enforcement.h35 if (err || tp.tv_sec < 0) in get_current_time()
37 return static_cast<uint32_t>(tp.tv_sec); in get_current_time()
/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/extras/tests/pagingtest/
Dmmap_test.c41 printf("mmap: %llu us\n", total_time_mmap.tv_sec * USEC_PER_SEC + total_time_mmap.tv_usec); in mmap_test()
42 … printf("munmap: %llu us\n", total_time_munmap.tv_sec * USEC_PER_SEC + total_time_munmap.tv_usec); in mmap_test()

12345