Searched defs:ts (Results 1 - 25 of 32) sorted by relevance

12

/bionic/libc/bionic/
H A Dclock.cpp37 timespec ts; local
38 if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == -1) {
41 return (ts.tv_sec * CLOCKS_PER_SEC) + (ts.tv_nsec / (NS_PER_S / CLOCKS_PER_SEC));
H A Dsys_time.cpp38 timespec ts[2]; local
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);
59 timespec ts[2]; local
60 if (tv && (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1]))) {
64 return futimens(fd, tv ? ts : nullptr);
H A Dbionic_time_conversions.cpp33 bool timespec_from_timeval(timespec& ts, const timeval& tv) { argument
35 ts.tv_sec = tv.tv_sec;
41 ts.tv_nsec = tv.tv_usec * 1000;
45 void timespec_from_ms(timespec& ts, const int ms) { argument
46 ts.tv_sec = ms / 1000;
47 ts.tv_nsec = (ms % 1000) * 1000000;
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 Dsys_sem.cpp64 int semtimedop(int id, sembuf* ops, size_t op_count, const timespec* ts) { argument
66 return syscall(SYS_semtimedop, id, ops, op_count, ts);
68 return syscall(SYS_ipc, SEMTIMEDOP, id, op_count, 0, ops, ts);
H A Dpoll.cpp41 timespec ts; local
44 timespec_from_ms(ts, ms);
45 ts_ptr = &ts;
50 int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) { argument
59 return ppoll64(fds, fd_count, ts, ss_ptr);
62 int ppoll64(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset64_t* ss) { argument
66 if (ts != nullptr) {
67 mutable_ts = *ts;
82 timespec ts; local
85 if (!timespec_from_timeval(ts, *t
98 pselect(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, const timespec* ts, const sigset_t* ss) argument
111 pselect64(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, const timespec* ts, const sigset64_t* ss) argument
[all...]
H A Dposix_timers.cpp204 int timer_gettime(timer_t id, itimerspec* ts) { argument
205 return __timer_gettime(to_kernel_timer_id(id), ts);
213 int timer_settime(timer_t id, int flags, const itimerspec* ts, itimerspec* ots) { argument
215 return __timer_settime(timer->kernel_timer_id, flags, ts, ots);
H A Dpthread_cond.cpp231 timespec ts; local
234 absolute_timespec_from_timespec(ts, *rel_timeout, CLOCK_MONOTONIC);
235 abs_timeout = &ts;
242 timespec ts; local
243 timespec_from_ms(ts, ms);
244 return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
H A Dndk_cruft.cpp107 char* strtotimeval(const char* str, struct timeval* ts) { argument
109 ts->tv_sec = strtoumax(str, &s, 10);
129 ts->tv_usec = fractional_seconds;
H A Dpthread_mutex.cpp939 timespec ts; local
940 timespec_from_ms(ts, ms);
942 absolute_timespec_from_timespec(abs_timeout, ts, CLOCK_MONOTONIC);
/bionic/libc/private/
H A Dbionic_time_conversions.h40 __LIBC_HIDDEN__ bool timespec_from_timeval(timespec& ts, const timeval& tv);
41 __LIBC_HIDDEN__ void timespec_from_ms(timespec& ts, const int ms);
43 __LIBC_HIDDEN__ void timeval_from_timespec(timeval& tv, const timespec& ts);
50 static inline int check_timespec(const timespec* ts, bool null_allowed) { argument
51 if (null_allowed && ts == nullptr) {
56 if (ts->tv_nsec < 0 || ts->tv_nsec >= NS_PER_S) {
59 if (ts->tv_sec < 0) {
66 static inline void absolute_timespec_from_timespec(timespec& abs_ts, const timespec& ts, clockid_t clock) { argument
68 abs_ts.tv_sec += ts
[all...]
/bionic/tests/
H A Dsys_sem_test.cpp62 timespec ts = { .tv_sec = 0, .tv_nsec = 100 }; local
65 ASSERT_EQ(-1, semtimedop(id, ops, 1, &ts));
H A Dsemaphore_test.cpp95 static inline void timespec_add_ms(timespec& ts, size_t ms) { argument
96 ts.tv_sec += ms / 1000;
97 ts.tv_nsec += (ms % 1000) * 1000000;
98 if (ts.tv_nsec >= NS_PER_S) {
99 ts.tv_sec++;
100 ts.tv_nsec -= NS_PER_S;
109 timespec ts; local
110 ASSERT_EQ(0, clock_gettime(clock, &ts));
111 timespec_add_ms(ts, 100);
114 ASSERT_EQ(-1, wait_function(&s, &ts));
[all...]
H A Dsys_socket_test.cpp158 struct timespec ts; local
159 memset(&ts, 0, sizeof(ts));
160 ts.tv_sec = 5;
161 ts.tv_nsec = 0;
163 static_cast<size_t>(recvmmsg(fd_acc, msgs, NUM_RECV_MSGS, 0, &ts)))
H A Dtime_test.cpp300 itimerspec ts; local
301 ts.it_value.tv_sec = value_s;
302 ts.it_value.tv_nsec = value_ns;
303 ts.it_interval.tv_sec = interval_s;
304 ts.it_interval.tv_nsec = interval_ns;
305 ASSERT_EQ(0, timer_settime(t, 0, &ts, NULL));
354 itimerspec ts; local
355 ts.it_value.tv_sec = 0;
356 ts.it_value.tv_nsec = 1;
357 ts
591 itimerspec ts; local
633 timespec ts; local
638 timespec ts; local
643 timespec ts; local
648 timespec ts; local
653 timespec ts; local
659 timespec ts; local
665 timespec ts; local
672 timespec ts; local
679 timespec ts; local
684 timespec ts; local
689 timespec ts; local
697 timespec ts = { -1, -1 }; local
722 timespec ts; local
729 timespec ts; local
749 timespec ts; local
[all...]
/bionic/libc/kernel/uapi/linux/
H A Derrqueue.h41 struct timespec ts[3]; member in struct:scm_timestamping
H A Dptp_clock.h57 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; member in struct:ptp_sys_offset
H A Domap3isp.h89 struct timeval ts; member in struct:omap3isp_stat_data
/bionic/libc/versioner-dependencies/common/kernel_uapi/linux/
H A Derrqueue.h41 struct timespec ts[3]; member in struct:scm_timestamping
H A Dptp_clock.h57 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; member in struct:ptp_sys_offset
/bionic/tools/versioner/dependencies/common/kernel_uapi/linux/
H A Derrqueue.h41 struct timespec ts[3]; member in struct:scm_timestamping
H A Dptp_clock.h57 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; member in struct:ptp_sys_offset
/bionic/libc/upstream-openbsd/lib/libc/net/
H A Dres_random.c178 struct timespec ts; local
222 clock_gettime(CLOCK_MONOTONIC, &ts);
223 ru_reseed = ts.tv_sec + RU_OUT;
230 struct timespec ts; local
235 clock_gettime(CLOCK_MONOTONIC, &ts);
240 if (ru_counter >= RU_MAX || ts.tv_sec > ru_reseed || pid != ru_pid) {
/bionic/libc/upstream-netbsd/lib/libc/isc/
H A Dev_timers.c168 struct timespec ts; local
170 ts.tv_sec = tv.tv_sec;
171 ts.tv_nsec = tv.tv_usec * 1000;
172 return (ts);
176 evTimeVal(struct timespec ts) { argument
179 tv.tv_sec = ts.tv_sec;
180 tv.tv_usec = (suseconds_t)(ts.tv_nsec / 1000);
/bionic/libc/async_safe/
H A Dasync_safe_log.cpp491 timespec ts; local
492 clock_gettime(CLOCK_REALTIME, &ts);
494 realtime_ts.tv_sec = ts.tv_sec;
495 realtime_ts.tv_nsec = ts.tv_nsec;
/bionic/libc/dns/resolv/
H A Dres_cache.c1362 struct timespec ts = {0,0}; local
1364 ts.tv_sec = _time_now() + PENDING_REQUEST_TIMEOUT;
1365 pthread_cond_timedwait(&ri->cond, &_res_cache_list_lock, &ts);

Completed in 4185 milliseconds

12