/bionic/libc/bionic/ |
D | sys_time.cpp | 37 static int futimesat(int fd, const char* path, const timeval tv[2], int flags) { in futimesat() 39 if (tv && (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1]))) { in futimesat() 43 return utimensat(fd, path, tv ? ts : nullptr, flags); in futimesat() 46 int utimes(const char* path, const timeval tv[2]) { in utimes() 47 return futimesat(AT_FDCWD, path, tv, 0); in utimes() 50 int lutimes(const char* path, const timeval tv[2]) { in lutimes() 51 return futimesat(AT_FDCWD, path, tv, AT_SYMLINK_NOFOLLOW); in lutimes() 54 int futimesat(int fd, const char* path, const timeval tv[2]) { in futimesat() 55 return futimesat(fd, path, tv, 0); in futimesat() 58 int futimes(int fd, const timeval tv[2]) { in futimes() [all …]
|
D | bionic_time_conversions.cpp | 33 bool timespec_from_timeval(timespec& ts, const timeval& tv) { in timespec_from_timeval() argument 35 ts.tv_sec = tv.tv_sec; in timespec_from_timeval() 38 if (tv.tv_usec >= 1000000 || tv.tv_usec < 0) { in timespec_from_timeval() 41 ts.tv_nsec = tv.tv_usec * 1000; in timespec_from_timeval() 50 void timeval_from_timespec(timeval& tv, const timespec& ts) { in timeval_from_timespec() argument 51 tv.tv_sec = ts.tv_sec; in timeval_from_timespec() 52 tv.tv_usec = ts.tv_nsec / 1000; in timeval_from_timespec()
|
D | poll.cpp | 68 int select(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, timeval* tv) { in select() argument 71 if (tv != NULL) { in select() 72 if (!timespec_from_timeval(ts, *tv)) { in select() 79 if (tv != NULL) { in select() 80 timeval_from_timespec(*tv, ts); in select()
|
D | vdso.cpp | 40 int gettimeofday(timeval* tv, struct timezone* tz) { in gettimeofday() argument 44 return vdso_gettimeofday(tv, tz); in gettimeofday() 46 return __gettimeofday(tv, tz); in gettimeofday()
|
D | getentropy_linux.c | 348 struct timeval tv; in getentropy_fallback() local 371 HX((e = gettimeofday(&tv, NULL)) == -1, tv); in getentropy_fallback() 373 cnt += (int)tv.tv_sec; in getentropy_fallback() 374 cnt += (int)tv.tv_usec; in getentropy_fallback() 513 HX((e = gettimeofday(&tv, NULL)) == -1, tv); in getentropy_fallback() 515 cnt += (int)tv.tv_sec; in getentropy_fallback() 516 cnt += (int)tv.tv_usec; in getentropy_fallback()
|
D | ndk_cruft.cpp | 305 struct timeval tv; in ftime() local 308 if (gettimeofday(&tv, &tz) < 0) in ftime() 311 tb->time = tv.tv_sec; in ftime() 312 tb->millitm = (tv.tv_usec + 500) / 1000; in ftime()
|
/bionic/tests/ |
D | sys_time_test.cpp | 34 timeval tv[2] = {}; in TEST() local 36 tv[0].tv_usec = -123; in TEST() 37 ASSERT_EQ(-1, utimes(tf.filename, tv)); in TEST() 39 tv[0].tv_usec = 1234567; in TEST() 40 ASSERT_EQ(-1, utimes(tf.filename, tv)); in TEST() 43 tv[0].tv_usec = 0; in TEST() 45 tv[1].tv_usec = -123; in TEST() 46 ASSERT_EQ(-1, utimes(tf.filename, tv)); in TEST() 48 tv[1].tv_usec = 1234567; in TEST() 49 ASSERT_EQ(-1, utimes(tf.filename, tv)); in TEST() [all …]
|
D | sys_select_test.cpp | 107 timeval tv; in TEST() local 108 tv.tv_sec = -1; in TEST() 109 tv.tv_usec = 0; in TEST() 110 ASSERT_EQ(-1, select(max, &r, &w, &e, &tv)); in TEST() 114 tv.tv_sec = 1; in TEST() 120 ASSERT_EQ(1, select(fd+1, &r, NULL, NULL, &tv)); in TEST() 122 ASSERT_EQ(0, tv.tv_sec); in TEST() 123 ASSERT_NE(0, tv.tv_usec); in TEST() 162 timespec tv; in TEST() local 163 tv.tv_sec = -1; in TEST() [all …]
|
D | sys_socket_test.cpp | 85 timeval tv; in RunTest() local 86 tv.tv_sec = 5; in RunTest() 87 tv.tv_usec = 0; in RunTest() 88 ASSERT_LT(0, select(fd+1, &read_set, NULL, NULL, &tv)); in RunTest() 215 timeval tv; in TestSendMMsg() local 216 tv.tv_sec = 5; in TestSendMMsg() 217 tv.tv_usec = 0; in TestSendMMsg() 218 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/libc/include/sys/ |
D | time.h | 89 #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ argument 90 (ts)->tv_sec = (tv)->tv_sec; \ 91 (ts)->tv_nsec = (tv)->tv_usec * 1000; \ 93 #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ argument 94 (tv)->tv_sec = (ts)->tv_sec; \ 95 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
|
/bionic/benchmarks/ |
D | time_benchmark.cpp | 41 timeval tv; in BM_time_gettimeofday() local 43 gettimeofday(&tv, nullptr); in BM_time_gettimeofday() 49 timeval tv; in BM_time_gettimeofday_syscall() local 51 syscall(__NR_gettimeofday, &tv, nullptr); in BM_time_gettimeofday_syscall()
|
/bionic/libc/private/ |
D | bionic_time_conversions.h | 40 __LIBC_HIDDEN__ bool timespec_from_timeval(timespec& ts, const timeval& tv); 43 __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 | 1374 struct timeval tv, *tvp; in pselect() local 1379 tvp = &tv; in pselect() 1380 tv = evTimeVal(*tsp); in pselect() 1389 *tsp = evTimeSpec(tv); in pselect()
|
D | res_cache.c | 349 struct timeval tv; in _time_now() local 351 gettimeofday( &tv, NULL ); in _time_now() 352 return tv.tv_sec; in _time_now()
|