/bionic/libc/bionic/ |
D | bionic_time_conversions.cpp | 31 bool timespec_from_timeval(timespec& ts, const timeval& tv) { in timespec_from_timeval() argument 33 ts.tv_sec = tv.tv_sec; in timespec_from_timeval() 36 if (tv.tv_usec >= 1000000 || tv.tv_usec < 0) { in timespec_from_timeval() 39 ts.tv_nsec = tv.tv_usec * 1000; in timespec_from_timeval() 48 void timeval_from_timespec(timeval& tv, const timespec& ts) { in timeval_from_timespec() argument 49 tv.tv_sec = ts.tv_sec; in timeval_from_timespec() 50 tv.tv_usec = ts.tv_nsec / 1000; in timeval_from_timespec()
|
D | utimes.cpp | 35 int utimes(const char* path, const timeval tv[2]) { in utimes() 38 if (tv != NULL) { in utimes() 39 if (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1])) { in utimes()
|
D | poll.cpp | 66 int select(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, timeval* tv) { in select() argument 69 if (tv != NULL) { in select() 70 if (!timespec_from_timeval(ts, *tv)) { in select() 77 if (tv != NULL) { in select() 78 timeval_from_timespec(*tv, ts); in select()
|
D | getentropy_linux.c | 360 struct timeval tv; in getentropy_fallback() local 383 HX((e = gettimeofday(&tv, NULL)) == -1, tv); in getentropy_fallback() 385 cnt += (int)tv.tv_sec; in getentropy_fallback() 386 cnt += (int)tv.tv_usec; in getentropy_fallback() 525 HX((e = gettimeofday(&tv, NULL)) == -1, tv); in getentropy_fallback() 527 cnt += (int)tv.tv_sec; in getentropy_fallback() 528 cnt += (int)tv.tv_usec; in getentropy_fallback()
|
D | ndk_cruft.cpp | 281 struct timeval tv; in ftime() local 284 if (gettimeofday(&tv, &tz) < 0) in ftime() 287 tb->time = tv.tv_sec; in ftime() 288 tb->millitm = (tv.tv_usec + 500) / 1000; in ftime()
|
D | vdso.cpp | 59 int gettimeofday(timeval* tv, struct timezone* tz) { in gettimeofday() argument 62 return vdso_gettimeofday(tv, tz); in gettimeofday()
|
/bionic/tests/ |
D | sys_time_test.cpp | 26 timeval tv[2]; in TEST() local 27 memset(&tv, 0, sizeof(tv)); in TEST() 29 tv[0].tv_usec = -123; in TEST() 30 ASSERT_EQ(-1, utimes("/", tv)); in TEST() 32 tv[0].tv_usec = 1234567; in TEST() 33 ASSERT_EQ(-1, utimes("/", tv)); in TEST() 35 tv[0].tv_usec = 0; in TEST() 37 tv[1].tv_usec = -123; in TEST() 38 ASSERT_EQ(-1, utimes("/", tv)); in TEST() 40 tv[1].tv_usec = 1234567; in TEST() [all …]
|
D | sys_select_test.cpp | 95 timeval tv; in TEST() local 96 tv.tv_sec = -1; in TEST() 97 tv.tv_usec = 0; in TEST() 98 ASSERT_EQ(-1, select(max, &r, &w, &e, &tv)); in TEST() 102 tv.tv_sec = 1; in TEST() 108 ASSERT_EQ(1, select(fd+1, &r, NULL, NULL, &tv)); in TEST() 110 ASSERT_EQ(0, tv.tv_sec); in TEST() 111 ASSERT_NE(0, tv.tv_usec); in TEST() 141 timespec tv; in TEST() local 142 tv.tv_sec = -1; in TEST() [all …]
|
D | sys_socket_test.cpp | 95 timeval tv; in RunTest() local 96 tv.tv_sec = 5; in RunTest() 97 tv.tv_usec = 0; in RunTest() 98 ASSERT_LT(0, select(fd+1, &read_set, NULL, NULL, &tv)); in RunTest() 247 timeval tv; in TestSendMMsg() local 248 tv.tv_sec = 5; in TestSendMMsg() 249 tv.tv_usec = 0; in TestSendMMsg() 250 ASSERT_LT(0, select(fd_acc+1, &read_set, NULL, NULL, &tv)); in TestSendMMsg()
|
/bionic/libc/upstream-netbsd/lib/libc/gen/ |
D | utime.c | 52 struct timeval tv[2], *tvp; in utime() local 59 tv[0].tv_sec = times->actime; in utime() 60 tv[1].tv_sec = times->modtime; in utime() 61 tv[0].tv_usec = tv[1].tv_usec = 0; in utime() 62 tvp = tv; in utime()
|
/bionic/libm/upstream-freebsd/lib/msun/src/ |
D | s_exp2f.c | 97 double tv, twopk, u, z; in exp2f() local 131 tv = exp2ft[i0]; in exp2f() 132 u = tv * z; in exp2f() 133 tv = tv + u * (P1 + z * P2) + u * (z * z) * (P3 + z * P4); in exp2f() 136 return (tv * twopk); in exp2f()
|
/bionic/benchmarks/ |
D | time_benchmark.cpp | 49 timeval tv; in BM_time_gettimeofday() local 51 gettimeofday(&tv, NULL); in BM_time_gettimeofday() 61 timeval tv; in BM_time_gettimeofday_syscall() local 63 syscall(__NR_gettimeofday, &tv, NULL); in BM_time_gettimeofday_syscall()
|
/bionic/libc/private/ |
D | bionic_time_conversions.h | 37 __LIBC_HIDDEN__ bool timespec_from_timeval(timespec& ts, const timeval& tv); 40 __LIBC_HIDDEN__ void timeval_from_timespec(timeval& tv, const timespec& ts);
|
/bionic/libc/upstream-netbsd/lib/libc/isc/ |
D | ev_timers.c | 167 evTimeSpec(struct timeval tv) { in evTimeSpec() argument 170 ts.tv_sec = tv.tv_sec; in evTimeSpec() 171 ts.tv_nsec = tv.tv_usec * 1000; in evTimeSpec() 177 struct timeval tv; in evTimeVal() local 179 tv.tv_sec = ts.tv_sec; in evTimeVal() 180 tv.tv_usec = (suseconds_t)(ts.tv_nsec / 1000); in evTimeVal() 181 return (tv); in evTimeVal()
|
/bionic/libc/dns/resolv/ |
D | res_send.c | 1335 struct timeval tv, *tvp; in pselect() local 1340 tvp = &tv; in pselect() 1341 tv = evTimeVal(*tsp); in pselect() 1350 *tsp = evTimeSpec(tv); in pselect()
|
D | res_cache.c | 351 struct timeval tv; in _time_now() local 353 gettimeofday( &tv, NULL ); in _time_now() 354 return tv.tv_sec; in _time_now()
|