/third_party/mesa3d/include/android_stub/log/ |
D | log_time.h | 27 #define LOG_TIME_SEC(t) ((t)->tv_sec) 37 uint32_t tv_sec = 0; /* good to Feb 5 2106 */ 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() function 52 tv_sec = static_cast<uint32_t>(T.tv_sec); in log_time() 58 return (tv_sec == static_cast<uint32_t>(T.tv_sec)) && 65 return (tv_sec < static_cast<uint32_t>(T.tv_sec)) || 66 ((tv_sec == static_cast<uint32_t>(T.tv_sec)) && 73 return (tv_sec > static_cast<uint32_t>(T.tv_sec)) || 74 ((tv_sec == static_cast<uint32_t>(T.tv_sec)) && [all …]
|
/third_party/grpc/src/core/lib/gpr/ |
D | time.cc | 30 int cmp = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec); in gpr_time_cmp() 32 if (cmp == 0 && a.tv_sec != INT64_MAX && a.tv_sec != INT64_MIN) { in gpr_time_cmp() 48 out.tv_sec = 0; in gpr_time_0() 56 out.tv_sec = INT64_MAX; in gpr_inf_future() 64 out.tv_sec = INT64_MIN; in gpr_inf_past() 80 out.tv_sec = time_in_units / units_per_sec; in to_seconds_from_sub_second_time() 82 out.tv_sec = (-((units_per_sec - 1) - (time_in_units + units_per_sec)) / in to_seconds_from_sub_second_time() 87 static_cast<int32_t>((time_in_units - out.tv_sec * units_per_sec) * in to_seconds_from_sub_second_time() 103 out.tv_sec = time_in_units * secs_per_unit; in to_seconds_from_above_second_time() 148 if (a.tv_sec == INT64_MAX || a.tv_sec == INT64_MIN) { in gpr_time_add() [all …]
|
/third_party/weston/tests/ |
D | timespec-test.c | 46 a.tv_sec = 1; in ZUC_TEST() 48 b.tv_sec = 0; in ZUC_TEST() 51 ZUC_ASSERT_EQ(r.tv_sec, 0); in ZUC_TEST() 59 a.tv_sec = 4; in ZUC_TEST() 68 a.tv_sec = 4; in ZUC_TEST() 77 a.tv_sec = 4; in ZUC_TEST() 89 a.tv_sec = 0; in ZUC_TEST() 96 a.tv_sec = 1234; in ZUC_TEST() 103 a.tv_sec = (time_t)0x7000123470005678LL; in ZUC_TEST() 106 ZUC_ASSERT_EQ((uint64_t)a.tv_sec >> 32, tv_sec_hi); in ZUC_TEST() [all …]
|
/third_party/mesa3d/src/util/tests/timespec/ |
D | timespec_test.cpp | 34 a.tv_sec = 1; in TEST() 36 b.tv_sec = 1; in TEST() 39 EXPECT_EQ(r.tv_sec, 3); in TEST() 47 a.tv_sec = 1; in TEST() 49 b.tv_sec = 0; in TEST() 52 EXPECT_EQ(r.tv_sec, 0); in TEST() 60 a.tv_sec = 4; in TEST() 69 a.tv_sec = 4; in TEST() 78 a.tv_sec = 4; in TEST() 90 a.tv_sec = 0; in TEST() [all …]
|
/third_party/alsa-lib/test/ |
D | queue_timer.c | 8 if (tv->tv_sec == 0) { in normalize() 9 while (tv->tv_usec <= -1000000) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 10 while (tv->tv_usec >= 1000000) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 11 } else if (tv->tv_sec < 0) { in normalize() 12 while (tv->tv_usec <= -1000000) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 13 while (tv->tv_usec > 0) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 15 while (tv->tv_usec >= 1000000) { tv->tv_usec -= 1000000; ++tv->tv_sec; } in normalize() 16 while (tv->tv_usec < 0) { tv->tv_usec += 1000000; --tv->tv_sec; } in normalize() 72 prevdiff.tv_sec = 0; in main() 89 tv.tv_sec -= starttv.tv_sec; in main() [all …]
|
/third_party/boost/libs/chrono/example/ |
D | timeval_demo.cpp | 51 long tv_sec; /* seconds */ member 74 tp->tv_sec = static_cast<long>( t / 1000000UL); in gettimeofday() 91 long tv_sec; member in timeval_demo::xtime 97 --tv_sec; in fixup() 104 tv_sec = sec; in xtime() 107 tv_sec += tv_usec / 1000000; in xtime() 116 tv_sec = static_cast<long>(usec / 1000000); in xtime() 121 operator long long() const {return static_cast<long long>(tv_sec) * 1000000 + tv_usec;} in operator long long() 124 tv_sec += rhs.tv_sec; in operator +=() 128 ++tv_sec; in operator +=() [all …]
|
/third_party/mesa3d/src/util/ |
D | timespec.h | 53 r->tv_sec = a->tv_sec + b->tv_sec; in timespec_add() 56 r->tv_sec++; in timespec_add() 72 r->tv_sec = a->tv_sec - b->tv_sec; in timespec_sub() 75 r->tv_sec--; in timespec_sub() 90 r->tv_sec = a->tv_sec + (b / NSEC_PER_SEC); in timespec_add_nsec() 94 r->tv_sec++; in timespec_add_nsec() 97 r->tv_sec--; in timespec_add_nsec() 124 return (uint64_t)a->tv_sec * NSEC_PER_SEC + a->tv_nsec; in timespec_to_nsec() 153 return (uint64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000; in timespec_to_msec() 180 return (uint64_t)a->tv_sec * 1000000 + a->tv_nsec / 1000; in timespec_to_usec() [all …]
|
/third_party/musl/include/sys/ |
D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 45 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 50 (ts)->tv_sec = (tv)->tv_sec, \ 54 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/musl/porting/uniproton/kernel/include/sys/ |
D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 45 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 50 (ts)->tv_sec = (tv)->tv_sec, \ 54 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/musl/ndk_musl_include/sys/ |
D | time.h | 35 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 36 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 37 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 38 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 39 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 41 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 42 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 44 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 49 (ts)->tv_sec = (tv)->tv_sec, \ 53 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/musl/porting/liteos_m/kernel/include/sys/ |
D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 45 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 50 (ts)->tv_sec = (tv)->tv_sec, \ 54 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/ |
D | time.h | 36 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 37 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 38 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 39 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 40 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 42 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 43 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 45 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 50 (ts)->tv_sec = (tv)->tv_sec, \ 54 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/ |
D | s-c.c | 209 time_res.tv_sec = in main() 210 time_cour.tv_sec - 1 - time_zero.tv_sec; in main() 212 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main() 217 time_sav[4].tv_sec = time_sav[5].tv_sec; in main() 219 time_sav[5].tv_sec = time_sav[6].tv_sec; in main() 221 time_sav[6].tv_sec = time_sav[7].tv_sec; in main() 223 time_sav[7].tv_sec = time_res.tv_sec; in main() 226 time_sav[sav].tv_sec = time_res.tv_sec; in main() 231 output("%4i.%06i;\n", time_res.tv_sec, time_res.tv_usec); in main() 271 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/ |
D | s-c.c | 211 time_res.tv_sec = in main() 212 time_cour.tv_sec - 1 - time_zero.tv_sec; in main() 214 time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec; in main() 219 time_sav[4].tv_sec = time_sav[5].tv_sec; in main() 221 time_sav[5].tv_sec = time_sav[6].tv_sec; in main() 223 time_sav[6].tv_sec = time_sav[7].tv_sec; in main() 225 time_sav[7].tv_sec = time_res.tv_sec; in main() 228 time_sav[sav].tv_sec = time_res.tv_sec; in main() 265 output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, in main() 267 output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec, in main() [all …]
|
/third_party/musl/porting/liteos_a/kernel/include/sys/ |
D | time.h | 63 #define timerisset(t) ((t)->tv_sec || (t)->tv_usec) 64 #define timerclear(t) ((t)->tv_sec = (t)->tv_usec = 0) 65 #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ 66 (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) 67 #define timeradd(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec + (t)->tv_sec, \ 69 ((a)->tv_usec -= 1000000, (a)->tv_sec++) ) 70 #define timersub(s,t,a) (void) ( (a)->tv_sec = (s)->tv_sec - (t)->tv_sec, \ 72 ((a)->tv_usec += 1000000, (a)->tv_sec--) ) 77 (ts)->tv_sec = (tv)->tv_sec, \ 81 (tv)->tv_sec = (ts)->tv_sec, \
|
/third_party/boost/libs/serialization/performance/xml/ |
D | high_resolution_timer.hpp | 136 start_time.tv_sec = 0; in high_resolution_timer() 144 start_time.tv_sec = time_t(t); in high_resolution_timer() 145 start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; in high_resolution_timer() 158 return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; in now() 172 if (now.tv_sec == start_time.tv_sec) in elapsed() 175 return double(now.tv_sec - start_time.tv_sec) + in elapsed() 181 return double((std::numeric_limits<time_t>::max)() - start_time.tv_sec); in elapsed_max() 189 return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); in elapsed_min() 221 start_time.tv_sec = 0; in high_resolution_timer() 231 start_time.tv_sec = time_t(t); in high_resolution_timer() [all …]
|
/third_party/boost/libs/spirit/workbench/ |
D | high_resolution_timer.hpp | 132 start_time.tv_sec = 0; in high_resolution_timer() 140 start_time.tv_sec = time_t(t); in high_resolution_timer() 141 start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; in high_resolution_timer() 154 return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; in now() 168 if (now.tv_sec == start_time.tv_sec) in elapsed() 171 return double(now.tv_sec - start_time.tv_sec) + in elapsed() 177 return double((std::numeric_limits<time_t>::max)() - start_time.tv_sec); in elapsed_max() 185 return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); in elapsed_min() 214 start_time.tv_sec = 0; in high_resolution_timer() 224 start_time.tv_sec = time_t(t); in high_resolution_timer() [all …]
|
/third_party/weston/shared/ |
D | timespec-util.h | 46 r->tv_sec = a->tv_sec - b->tv_sec; in timespec_sub() 49 r->tv_sec--; in timespec_sub() 63 r->tv_sec = a->tv_sec + (b / NSEC_PER_SEC); in timespec_add_nsec() 67 r->tv_sec++; in timespec_add_nsec() 70 r->tv_sec--; in timespec_add_nsec() 95 return (int64_t)a->tv_sec * NSEC_PER_SEC + a->tv_nsec; in timespec_to_nsec() 122 return (int64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000; in timespec_to_msec() 147 return (int64_t)a->tv_sec * 1000000 + a->tv_nsec / 1000; in timespec_to_usec() 164 assert(a->tv_sec >= 0); in timespec_to_proto() 167 uint64_t sec64 = a->tv_sec; in timespec_to_proto() [all …]
|
/third_party/pulseaudio/src/pulse/ |
D | timeval.c | 61 tv->tv_sec = (time_t) (t / PA_USEC_PER_SEC); in pa_gettimeofday() 88 r = ((pa_usec_t) a->tv_sec - (pa_usec_t) b->tv_sec) * PA_USEC_PER_SEC; in pa_timeval_diff() 103 if (a->tv_sec < b->tv_sec) in pa_timeval_cmp() 106 if (a->tv_sec > b->tv_sec) in pa_timeval_cmp() 131 if (PA_UNLIKELY(tv->tv_sec > PA_INT_TYPE_MAX(time_t) - secs)) in pa_timeval_add() 134 tv->tv_sec += secs; in pa_timeval_add() 141 if (PA_UNLIKELY(tv->tv_sec >= PA_INT_TYPE_MAX(time_t))) in pa_timeval_add() 144 tv->tv_sec++; in pa_timeval_add() 151 tv->tv_sec = PA_INT_TYPE_MAX(time_t); in pa_timeval_add() 162 if (PA_UNLIKELY(tv->tv_sec < secs)) in pa_timeval_sub() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/ |
D | 2-1.c | 85 time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec; in main() 88 --time_diff.tv_sec; in main() 91 if (time_diff.tv_sec < TIMEOUT) { in main() 97 (long)currsec1.tv_sec, (long)currsec1.tv_usec, in main() 98 (long)currsec2.tv_sec, (long)currsec2.tv_usec); in main() 124 currsec1.tv_sec = ts.tv_sec; in f1() 130 timeout.tv_sec = currsec1.tv_sec + TIMEOUT; in f1() 135 TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec); in f1() 149 currsec2.tv_sec = ts.tv_sec; in f1()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/ |
D | 1-2.c | 129 if ((ts_th.tv_sec < ts_pre.tv_sec) || in main() 130 ((ts_th.tv_sec == ts_pre.tv_sec) && in main() 132 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main() 134 output("child: %d.%09d\n", ts_th.tv_sec, in main() 136 output("Post : %d.%09d\n", ts_post.tv_sec, in main() 141 if ((ts_post.tv_sec < ts_th.tv_sec) || in main() 142 ((ts_post.tv_sec == ts_th.tv_sec) && in main() 144 output("Pre : %d.%09d\n", ts_pre.tv_sec, in main() 146 output("child: %d.%09d\n", ts_th.tv_sec, in main() 148 output("Post : %d.%09d\n", ts_post.tv_sec, in main()
|
/third_party/musl/libc-test/src/functional/ |
D | utime.c | 31 TESTVAL(st.st_atim.tv_sec,==,0); in main() 33 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 36 …TEST(futimens(fd, ((struct timespec[2]){{.tv_sec=1,.tv_nsec=UTIME_OMIT},{.tv_sec=1,.tv_nsec=UTIME_… in main() 38 TESTVAL(st.st_atim.tv_sec,==,0); in main() 40 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 47 TESTVAL(st.st_atim.tv_sec,>=,t); in main() 48 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 54 TESTVAL(st.st_atim.tv_sec,==,0); in main() 55 TESTVAL(st.st_mtim.tv_sec,>=,t); in main() 59 TESTVAL(st.st_atim.tv_sec,>=,t); in main() [all …]
|
D | utime64.c | 34 TESTVAL(st.st_atim.tv_sec,==,0); in main() 36 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 39 …TEST(__futimens_time64(fd, ((struct timespec[2]){{.tv_sec=1,.tv_nsec=UTIME_OMIT},{.tv_sec=1,.tv_ns… in main() 41 TESTVAL(st.st_atim.tv_sec,==,0); in main() 43 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 50 TESTVAL(st.st_atim.tv_sec,>=,t); in main() 51 TESTVAL(st.st_mtim.tv_sec,==,0); in main() 57 TESTVAL(st.st_atim.tv_sec,==,0); in main() 58 TESTVAL(st.st_mtim.tv_sec,>=,t); in main() 62 TESTVAL(st.st_atim.tv_sec,>=,t); in main() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/ |
D | 7-2.c | 51 tsT1.tv_sec = tsT0.tv_sec + SLEEPOFFSET; in main() 54 tsT2.tv_sec = tsT1.tv_sec + SMALLTIME; in main() 73 if (tsT3.tv_sec >= tsT2.tv_sec) { in main() 74 if ((tsT3.tv_sec - tsT2.tv_sec) <= ACCEPTABLEDELTA) { in main() 78 (int)tsT3.tv_sec, (int)tsT2.tv_sec); in main() 83 (int)tsT3.tv_sec, (int)tsT2.tv_sec); in main()
|
/third_party/curl/lib/ |
D | timeval.c | 38 now.tv_sec = (time_t)(count.QuadPart / Curl_freq.QuadPart); in Curl_now() 53 now.tv_sec = milliseconds / 1000; in Curl_now() 94 cnow.tv_sec = tsnow.tv_sec; in Curl_now() 105 cnow.tv_sec = now.tv_sec; in Curl_now() 110 cnow.tv_sec = time(NULL); in Curl_now() 142 cnow.tv_sec = usecs / 1000000; in Curl_now() 160 ret.tv_sec = now.tv_sec; in Curl_now() 173 now.tv_sec = time(NULL); in Curl_now() 188 timediff_t diff = (timediff_t)newer.tv_sec-older.tv_sec; in Curl_timediff() 202 timediff_t diff = (timediff_t)newer.tv_sec-older.tv_sec; in Curl_timediff_us()
|