/bionic/libc/bionic/ |
H A D | clock.cpp | 37 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 D | utimes.cpp | 36 timespec ts[2]; local 39 if (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1])) { 43 ts_ptr = ts;
|
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; 39 ts.tv_nsec = tv.tv_usec * 1000; 43 void timespec_from_ms(timespec& ts, const int ms) { argument 44 ts.tv_sec = ms / 1000; 45 ts.tv_nsec = (ms % 1000) * 1000000; 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 | pthread_internals.cpp | 71 // Initialize 'ts' with the difference between 'abstime' and the current time 73 int __timespec_from_absolute(timespec* ts, const timespec* abstime, clockid_t clock) { argument 74 clock_gettime(clock, ts); 75 ts->tv_sec = abstime->tv_sec - ts->tv_sec; 76 ts->tv_nsec = abstime->tv_nsec - ts->tv_nsec; 77 if (ts->tv_nsec < 0) { 78 ts->tv_sec--; 79 ts [all...] |
H A D | poll.cpp | 39 timespec ts; local 42 timespec_from_ms(ts, ms); 43 ts_ptr = &ts; 48 int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) { argument 51 if (ts != NULL) { 52 mutable_ts = *ts; 67 timespec ts; local 70 if (!timespec_from_timeval(ts, *tv)) { 74 ts_ptr = &ts; 78 timeval_from_timespec(*tv, ts); 83 pselect(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, const timespec* ts, const sigset_t* ss) argument [all...] |
H A D | posix_timers.cpp | 197 int timer_gettime(timer_t id, itimerspec* ts) { argument 198 return __timer_gettime(to_kernel_timer_id(id), ts); 202 int timer_settime(timer_t id, int flags, const itimerspec* ts, itimerspec* ots) { argument 203 return __timer_settime(to_kernel_timer_id(id), flags, ts, ots);
|
H A D | pthread_rwlock.cpp | 139 timespec ts; local 140 timespec* rel_timeout = (abs_timeout == NULL) ? NULL : &ts; 175 timespec ts; local 176 timespec* rel_timeout = (abs_timeout == NULL) ? NULL : &ts;
|
H A D | semaphore.c | 295 struct timespec ts; local 299 clock_gettime( CLOCK_REALTIME, &ts ); 300 ts.tv_sec = abs_timeout->tv_sec - ts.tv_sec; 301 ts.tv_nsec = abs_timeout->tv_nsec - ts.tv_nsec; 302 if (ts.tv_nsec < 0) { 303 ts.tv_nsec += 1000000000; 304 ts.tv_sec -= 1; 307 if (ts [all...] |
H A D | getentropy_linux.c | 359 struct timespec ts; local 392 HX(clock_gettime(cl[ii], &ts) == -1, ts); local 401 ts.tv_sec = 0; 402 ts.tv_nsec = 1; 403 (void) nanosleep(&ts, NULL); 463 &ts)) == -1, ts); 465 cnt += (int)ts.tv_nsec;
|
H A D | pthread_cond.cpp | 167 timespec ts; local 171 if (__timespec_from_absolute(&ts, abstime, clock) < 0) { 174 tsp = &ts; 213 timespec ts; local 214 timespec_from_ms(ts, ms); 215 return __pthread_cond_timedwait_relative(cond, mutex, &ts);
|
H A D | ndk_cruft.cpp | 99 extern "C" char* strtotimeval(const char* str, struct timeval* ts) { argument 101 ts->tv_sec = strtoumax(str, &s, 10); 121 ts->tv_usec = fractional_seconds;
|
H A D | pthread_mutex.cpp | 623 timespec ts; local 643 if (__timespec_from_absolute(&ts, abs_timeout, clock) < 0) { 646 __futex_wait_ex(&mutex->value, shared, locked_contended, &ts); 684 if (__timespec_from_absolute(&ts, abs_timeout, clock) < 0) { 705 // Check time and update 'ts'. 706 if (__timespec_from_absolute(&ts, abs_timeout, clock) < 0) { 714 if (__futex_wait_ex(&mutex->value, shared, mvalue, &ts) == -ETIMEDOUT) {
|
H A D | libc_logging.cpp | 505 timespec ts; local 506 clock_gettime(CLOCK_REALTIME, &ts); 508 realtime_ts.tv_sec = ts.tv_sec; 509 realtime_ts.tv_nsec = ts.tv_nsec; 567 timespec ts; local 568 clock_gettime(CLOCK_REALTIME, &ts); 570 realtime_ts.tv_sec = ts.tv_sec; 571 realtime_ts.tv_nsec = ts.tv_nsec;
|
/bionic/libc/kernel/uapi/linux/ |
H A D | ptp_clock.h | 64 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; member in struct:ptp_sys_offset
|
H A D | omap3isp.h | 106 struct timeval ts; member in struct:omap3isp_stat_data
|
/bionic/tests/ |
H A D | sys_socket_test.cpp | 178 struct timespec ts; local 179 memset(&ts, 0, sizeof(ts)); 180 ts.tv_sec = 5; 181 ts.tv_nsec = 0; 183 static_cast<size_t>(recvmmsg(fd_acc, msgs, NUM_RECV_MSGS, 0, &ts)))
|
H A D | time_test.cpp | 137 itimerspec ts; local 138 ts.it_value.tv_sec = value_s; 139 ts.it_value.tv_nsec = value_ns; 140 ts.it_interval.tv_sec = interval_s; 141 ts.it_interval.tv_nsec = interval_ns; 142 ASSERT_EQ(0, timer_settime(t, TIMER_ABSTIME, &ts, NULL)); 193 itimerspec ts; local 194 ts.it_value.tv_sec = 0; 195 ts.it_value.tv_nsec = 1; 196 ts 367 itimerspec ts; local [all...] |
H A D | pthread_test.cpp | 448 timespec ts; local 449 ASSERT_EQ(0, clock_gettime(c, &ts)); 806 timespec ts; local 807 ASSERT_EQ(0, clock_gettime(CLOCK_REALTIME, &ts)); 808 ts.tv_nsec += 1; 809 ASSERT_EQ(ETIMEDOUT, pthread_mutex_timedlock(&m, &ts)); 814 ASSERT_EQ(0, clock_gettime(CLOCK_REALTIME, &ts)); 815 ts.tv_nsec += 1; 816 ASSERT_EQ(0, pthread_mutex_timedlock(&m, &ts));
|
/bionic/libc/upstream-netbsd/lib/libc/isc/ |
H A D | ev_timers.c | 168 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/dns/resolv/ |
H A D | res_cache.c | 1296 struct timespec ts = {0,0}; local 1298 ts.tv_sec = _time_now() + PENDING_REQUEST_TIMEOUT; 1299 pthread_cond_timedwait(&ri->cond, &_res_cache_list_lock, &ts);
|
/bionic/libc/tzcode/ |
H A D | localtime.c | 531 struct state *ts = &lsp->u.st; local 535 result = tzparse(&up->buf[1], ts, FALSE); 536 if (result == 0 && ts->typecnt == 2 && 537 sp->charcnt + ts->charcnt <= TZ_MAX_CHARS) { 539 ts->ttis[i].tt_abbrind += 541 for (i = 0; i < ts->charcnt; ++i) 543 ts->chars[i]; 545 while (i < ts->timecnt && 546 ts->ats[i] <= 549 while (i < ts [all...] |