Searched defs:tv (Results 1 - 15 of 15) sorted by relevance

/bionic/libc/bionic/
H A Dutimes.cpp36 int utimes(const char* path, const timeval tv[2]) { argument
39 if (tv != NULL) {
40 if (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1])) {
H A Dbionic_time_conversions.cpp33 bool timespec_from_timeval(timespec& ts, const timeval& tv) { argument
35 ts.tv_sec = tv.tv_sec;
38 if (tv.tv_usec >= 1000000 || tv.tv_usec < 0) {
41 ts.tv_nsec = tv.tv_usec * 1000;
50 void timeval_from_timespec(timeval& tv, const timespec& ts) { argument
51 tv.tv_sec = ts.tv_sec;
52 tv.tv_usec = ts.tv_nsec / 1000;
H A Dvdso.cpp40 int gettimeofday(timeval* tv, struct timezone* tz) { argument
44 return vdso_gettimeofday(tv, tz);
46 return __gettimeofday(tv, tz);
H A Dpoll.cpp68 int select(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, timeval* tv) { argument
71 if (tv != NULL) {
72 if (!timespec_from_timeval(ts, *tv)) {
79 if (tv != NULL) {
80 timeval_from_timespec(*tv, ts);
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.cpp300 struct timeval tv; local
303 if (gettimeofday(&tv, &tz) < 0)
306 tb->time = tv.tv_sec;
307 tb->millitm = (tv.tv_usec + 500) / 1000;
/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/tests/
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...]
H A Dsys_select_test.cpp107 timeval tv; local
108 tv.tv_sec = -1;
109 tv.tv_usec = 0;
110 ASSERT_EQ(-1, select(max, &r, &w, &e, &tv));
114 tv.tv_sec = 1;
120 ASSERT_EQ(1, select(fd+1, &r, NULL, NULL, &tv));
122 ASSERT_EQ(0, tv.tv_sec);
123 ASSERT_NE(0, tv.tv_usec);
162 timespec tv; local
163 tv
[all...]
H A Dsys_socket_test.cpp85 timeval tv; local
86 tv.tv_sec = 5;
87 tv.tv_usec = 0;
88 ASSERT_LT(0, select(fd+1, &read_set, NULL, NULL, &tv));
215 timeval tv; local
216 tv.tv_sec = 5;
217 tv.tv_usec = 0;
218 ASSERT_LT(0, select(fd_acc+1, &read_set, NULL, NULL, &tv));
/bionic/benchmarks/
H A Dtime_benchmark.cpp41 timeval tv; local
43 gettimeofday(&tv, NULL);
49 timeval tv; local
51 syscall(__NR_gettimeofday, &tv, NULL);
/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/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/libc/dns/resolv/
H A Dres_send.c1380 struct timeval tv, *tvp; local
1385 tvp = &tv;
1386 tv = evTimeVal(*tsp);
1395 *tsp = evTimeSpec(tv);
H A Dres_cache.c357 struct timeval tv; local
359 gettimeofday( &tv, NULL );
360 return tv.tv_sec;

Completed in 582 milliseconds