Searched refs:tv (Results 1 - 16 of 16) sorted by path

/bionic/benchmarks/
H A Dtime_benchmark.cpp49 timeval tv; local
51 gettimeofday(&tv, NULL);
61 timeval tv; local
63 syscall(__NR_gettimeofday, &tv, NULL);
/bionic/libc/bionic/
H A Dbionic_time_conversions.cpp31 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 Dgetentropy_linux.c360 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 Dndk_cruft.cpp281 struct timeval tv; local
284 if (gettimeofday(&tv, &tz) < 0)
287 tb->time = tv.tv_sec;
288 tb->millitm = (tv.tv_usec + 500) / 1000;
H A Dpoll.cpp66 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 Dutimes.cpp35 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 Dvdso.cpp59 int gettimeofday(timeval* tv, struct timezone* tz) { argument
62 return vdso_gettimeofday(tv, tz);
/bionic/libc/dns/resolv/
H A Dres_cache.c351 struct timeval tv; local
353 gettimeofday( &tv, NULL );
354 return tv.tv_sec;
H A Dres_send.c1331 struct timeval tv, *tvp; local
1336 tvp = &tv;
1337 tv = evTimeVal(*tsp);
1346 *tsp = evTimeSpec(tv);
/bionic/libc/private/
H A Dbionic_time_conversions.h37 __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/gen/
H A Dutime.c52 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/libc/upstream-netbsd/lib/libc/isc/
H A Dev_timers.c167 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/libm/upstream-freebsd/lib/msun/src/
H A Ds_exp2f.c97 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/tests/
H A Dsys_select_test.cpp95 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 Dsys_socket_test.cpp95 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));
H A Dsys_time_test.cpp26 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...]

Completed in 2720 milliseconds