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