Searched refs:tv (Results 1 - 17 of 17) sorted by relevance

/bionic/libc/bionic/
H A Dsys_time.cpp37 static int futimesat(int fd, const char* path, const timeval tv[2], int flags) { argument
39 if (tv && (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1]))) {
43 return utimensat(fd, path, tv ? ts : nullptr, flags);
46 int utimes(const char* path, const timeval tv[2]) { argument
47 return futimesat(AT_FDCWD, path, tv, 0);
50 int lutimes(const char* path, const timeval tv[2]) { argument
51 return futimesat(AT_FDCWD, path, tv, AT_SYMLINK_NOFOLLOW);
54 int futimesat(int fd, const char* path, const timeval tv[ argument
58 futimes(int fd, const timeval tv[2]) argument
[all...]
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.cpp54 int gettimeofday(timeval* tv, struct timezone* tz) { argument
58 return vdso_return(vdso_gettimeofday(tv, tz));
60 return __gettimeofday(tv, tz);
70 timeval tv; local
71 if (gettimeofday(&tv, nullptr) == -1) return -1;
72 if (t) *t = tv.tv_sec;
73 return tv.tv_sec;
H A Dpoll.cpp81 int select(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, timeval* tv) { argument
84 if (tv != nullptr) {
85 if (!timespec_from_timeval(ts, *tv)) {
92 if (tv != nullptr) {
93 timeval_from_timespec(*tv, ts);
H A Dndk_cruft.cpp305 struct timeval tv; local
308 if (gettimeofday(&tv, &tz) < 0)
311 tb->time = tv.tv_sec;
312 tb->millitm = (tv.tv_usec + 500) / 1000;
/bionic/tests/
H A Dsys_time_test.cpp34 timeval tv[2] = {}; local
36 tv[0].tv_usec = -123;
37 ASSERT_EQ(-1, utimes(tf.filename, tv));
39 tv[0].tv_usec = 1234567;
40 ASSERT_EQ(-1, utimes(tf.filename, tv));
43 tv[0].tv_usec = 0;
45 tv[1].tv_usec = -123;
46 ASSERT_EQ(-1, utimes(tf.filename, tv));
48 tv[1].tv_usec = 1234567;
49 ASSERT_EQ(-1, utimes(tf.filename, tv));
61 timeval tv[2] = {}; local
88 timeval tv[2] = {}; local
115 timeval tv[2] = {}; local
[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.cpp87 timeval tv; local
88 tv.tv_sec = 5;
89 tv.tv_usec = 0;
90 ASSERT_LT(0, select(fd+1, &read_set, NULL, NULL, &tv));
217 timeval tv; local
218 tv.tv_sec = 5;
219 tv.tv_usec = 0;
220 ASSERT_LT(0, select(fd_acc+1, &read_set, NULL, NULL, &tv));
/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/include/sys/
H A Dtime.h89 #define TIMEVAL_TO_TIMESPEC(tv, ts) { \
90 (ts)->tv_sec = (tv)->tv_sec; \
91 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
93 #define TIMESPEC_TO_TIMEVAL(tv, ts) { \
94 (tv)->tv_sec = (ts)->tv_sec; \
95 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
/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/tools/versioner/current/sys/
H A Dtime.h89 #define TIMEVAL_TO_TIMESPEC(tv, ts) { \
90 (ts)->tv_sec = (tv)->tv_sec; \
91 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
93 #define TIMESPEC_TO_TIMEVAL(tv, ts) { \
94 (tv)->tv_sec = (ts)->tv_sec; \
95 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
/bionic/libc/private/
H A Dbionic_time_conversions.h40 __LIBC_HIDDEN__ bool timespec_from_timeval(timespec& ts, const timeval& tv);
43 __LIBC_HIDDEN__ void timeval_from_timespec(timeval& tv, const timespec& ts);
/bionic/benchmarks/
H A Dtime_benchmark.cpp152 timeval tv; local
154 gettimeofday(&tv, nullptr);
160 timeval tv; local
162 syscall(__NR_gettimeofday, &tv, nullptr);
/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.c1377 struct timeval tv, *tvp; local
1382 tvp = &tv;
1383 tv = evTimeVal(*tsp);
1392 *tsp = evTimeSpec(tv);
H A Dres_cache.c349 struct timeval tv; local
351 gettimeofday( &tv, NULL );
352 return tv.tv_sec;

Completed in 247 milliseconds