/system/extras/tests/bionic/libc/other/ |
D | test_timer_create3.c | 47 struct itimerspec ts; in handle() local 56 ts.it_value.tv_sec = 0; in handle() 57 ts.it_value.tv_nsec = 0; in handle() 58 ts.it_interval.tv_sec = 1; in handle() 59 ts.it_interval.tv_nsec = 0; in handle() 60 timer_settime(tid, TIMER_ABSTIME, &ts, NULL); in handle() 69 struct itimerspec ts, ots; in create() local 82 ts.it_value.tv_sec = 0; in create() 83 ts.it_value.tv_nsec = 1; in create() 84 ts.it_interval.tv_sec = seconds; in create() [all …]
|
D | test_timer_create.c | 53 struct itimerspec ts, ots; in create() local 66 ts.it_value.tv_sec = 3; in create() 67 ts.it_value.tv_nsec = 0; in create() 68 ts.it_interval.tv_sec = seconds; in create() 69 ts.it_interval.tv_nsec = 0; in create() 70 if (timer_settime (tid, TIMER_ABSTIME, &ts, &ots) < 0) in create()
|
D | test_thread_max.c | 51 struct timespec ts; in main() local 57 ts.tv_sec = 0; in main() 58 ts.tv_nsec = 0.002*1e9; in main() 59 nanosleep( &ts, &ts ); in main()
|
D | test_timer_create2.c | 53 struct itimerspec ts, ots; in create() local 65 ts.it_value.tv_sec = 3; in create() 66 ts.it_value.tv_nsec = 0; in create() 67 ts.it_interval.tv_sec = seconds; in create() 68 ts.it_interval.tv_nsec = 0; in create() 69 if (timer_settime (tid, TIMER_ABSTIME, &ts, &ots) < 0) in create()
|
D | test_zlib.c | 160 struct timespec ts; in get_time_usec() local 162 if ( clock_gettime( CLOCK_MONOTONIC, &ts ) < 0 ) in get_time_usec() 165 return ts.tv_sec*1e6 + ts.tv_nsec*1e-3; in get_time_usec()
|
D | test_jpeg.c | 223 struct timespec ts; in get_time_usec() local 225 if ( clock_gettime( CLOCK_MONOTONIC, &ts ) < 0 ) in get_time_usec() 228 return ts.tv_sec*1e6 + ts.tv_nsec*1e-3; in get_time_usec()
|
/system/core/include/utils/ |
D | Condition.h | 110 struct timespec ts; in waitRelative() local 111 ts.tv_sec = reltime/1000000000; in waitRelative() 112 ts.tv_nsec = reltime%1000000000; in waitRelative() 113 return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts); in waitRelative() 115 struct timespec ts; in waitRelative() 117 clock_gettime(CLOCK_REALTIME, &ts); in waitRelative() 122 ts.tv_sec = t.tv_sec; in waitRelative() 123 ts.tv_nsec= t.tv_usec*1000; in waitRelative() 125 ts.tv_sec += reltime/1000000000; in waitRelative() 126 ts.tv_nsec+= reltime%1000000000; in waitRelative() [all …]
|
/system/extras/tests/bionic/libc/common/ |
D | test_pthread_getcpuclockid.c | 42 struct timespec ts; in thread_func() local 55 ts.tv_sec = 0; in thread_func() 56 ts.tv_nsec = 300000000 + ((int)arg)*50000000; in thread_func() 57 nanosleep( &ts, &ts ); in thread_func() 59 clock_gettime( clock, &ts ); in thread_func() 60 …fprintf(stderr, "thread %08lx: clock_gettime() returned %g nsecs\n", self, ts.tv_sec*1e9 + ts.tv_n… in thread_func()
|
D | test_pthread_once.c | 42 struct timespec ts; in once_function() local 46 ts.tv_sec = 2; in once_function() 47 ts.tv_nsec = 0; in once_function() 48 nanosleep (&ts, NULL); in once_function()
|
D | test_pthread_rwlock.c | 75 struct timespec ts[1]; in time_now() local 77 clock_gettime(CLOCK_MONOTONIC, ts); in time_now() 78 return (double)ts->tv_sec + ts->tv_nsec/1e9; in time_now() 84 struct timespec ts; in time_sleep() local 87 ts.tv_sec = (time_t)delay; in time_sleep() 88 ts.tv_nsec = (long)((delay - ts.tv_sec)*1e9); in time_sleep() 91 ret = nanosleep(&ts, &ts); in time_sleep()
|
D | bench_stdio.c | 48 struct timespec ts; in now_ms() local 49 clock_gettime(CLOCK_MONOTONIC, &ts); in now_ms() 50 return ts.tv_sec*1000. + ts.tv_nsec*1e-6; in now_ms()
|
D | test_pthread_mutex.c | 76 struct timespec ts[1]; in time_now() local 78 clock_gettime(CLOCK_MONOTONIC, ts); in time_now() 79 return (double)ts->tv_sec + ts->tv_nsec/1e9; in time_now() 85 struct timespec ts; in time_sleep() local 88 ts.tv_sec = (time_t)delay; in time_sleep() 89 ts.tv_nsec = (long)((delay - ts.tv_sec)*1e9); in time_sleep() 92 ret = nanosleep(&ts, &ts); in time_sleep()
|
D | bench_pthread.c | 63 struct timespec ts; in now_ns() local 68 clock_gettime(CLOCK_THREAD_CPUTIME_ID,&ts); in now_ns() 69 return ts.tv_sec*1000000000LL + ts.tv_nsec; in now_ns()
|
/system/core/libutils/ |
D | SystemClock.cpp | 114 struct timespec ts; in elapsedRealtimeNano() local 128 result = clock_gettime(CLOCK_BOOTTIME, &ts); in elapsedRealtimeNano() 130 timestamp = seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano() 148 ANDROID_ALARM_GET_TIME(ANDROID_ALARM_ELAPSED_REALTIME), &ts); in elapsedRealtimeNano() 151 timestamp = seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
|
/system/core/toolbox/ |
D | date.c | 17 struct timespec ts; in settime() local 38 ts.tv_sec = t; in settime() 39 ts.tv_nsec = 0; in settime() 40 ioctl(fd, ANDROID_ALARM_SET_RTC, &ts); in settime() 50 struct timespec ts; in date_main() local 119 ts.tv_sec = tv.tv_sec; in date_main() 120 ts.tv_nsec = tv.tv_usec * 1000; in date_main() 121 res = ioctl(fd, ANDROID_ALARM_SET_RTC, &ts); in date_main()
|
D | alarm.c | 17 struct timespec ts; in alarm_main() local 105 time(&ts.tv_sec); in alarm_main() 106 ts.tv_nsec = 0; in alarm_main() 114 res = ioctl(afd, ANDROID_ALARM_GET_TIME(alarmtype), &ts); in alarm_main() 119 ts.tv_sec += strtol(argv[optind], NULL, 0); in alarm_main() 121 gmtime_r(&ts.tv_sec, &tm); in alarm_main() 122 printf("time %s -> %ld.%09ld\n", argv[optind], ts.tv_sec, ts.tv_nsec); in alarm_main() 126 res = ioctl(afd, ANDROID_ALARM_SET(alarmtype), &ts); in alarm_main()
|
D | uptime.c | 59 struct timespec ts; in elapsedRealtime() local 66 result = ioctl(fd, ANDROID_ALARM_GET_TIME(ANDROID_ALARM_ELAPSED_REALTIME), &ts); in elapsedRealtime() 70 return ts.tv_sec; in elapsedRealtime()
|
/system/core/adb/ |
D | commandline.c | 514 const char *ts; in dupAndQuote() local 519 ts = s; in dupAndQuote() 523 for( ;*ts != '\0'; ts++) { in dupAndQuote() 525 if (*ts == ' ' || *ts == '"' || *ts == '\\' || *ts == '(' || *ts == ')') { in dupAndQuote() 532 ts = s; in dupAndQuote() 535 for ( ;*ts != '\0'; ts++) { in dupAndQuote() 536 if (*ts == ' ' || *ts == '"' || *ts == '\\' || *ts == '(' || *ts == ')') { in dupAndQuote() 540 *dest++ = *ts; in dupAndQuote()
|
D | usb_linux.c | 316 struct timespec ts; in usb_bulk_write() local 345 ts.tv_sec = tv.tv_sec + 5; in usb_bulk_write() 346 ts.tv_nsec = tv.tv_usec * 1000L; in usb_bulk_write() 347 res = pthread_cond_timedwait(&h->notify, &h->lock, &ts); in usb_bulk_write()
|
/system/extras/sane_schedstat/ |
D | sane_schedstat.c | 113 unsigned long long ts; in parse() local 122 if (!b || sscanf(b, "timestamp %llu\n", &ts) != 1) { in parse()
|
/system/core/libnetutils/ |
D | dhcpclient.c | 55 struct timespec ts; in get_msecs() local 57 if (clock_gettime(CLOCK_MONOTONIC, &ts)) { in get_msecs() 60 return (((msecs_t) ts.tv_sec) * ((msecs_t) 1000)) + in get_msecs() 61 (((msecs_t) ts.tv_nsec) / ((msecs_t) 1000000)); in get_msecs()
|
/system/core/init/ |
D | util.c | 263 struct timespec ts; in gettime() local 266 ret = clock_gettime(CLOCK_MONOTONIC, &ts); in gettime() 272 return ts.tv_sec; in gettime()
|
/system/media/audio_utils/ |
D | echo_reference.c | 331 struct timespec ts; in echo_reference_read() local 333 ts.tv_sec = timeoutMs/1000; in echo_reference_read() 334 ts.tv_nsec = timeoutMs%1000; in echo_reference_read() 335 pthread_cond_timedwait_relative_np(&er->cond, &er->lock, &ts); in echo_reference_read()
|
/system/core/fs_mgr/ |
D | fs_mgr.c | 117 struct timespec ts; in gettime() local 120 ret = clock_gettime(CLOCK_MONOTONIC, &ts); in gettime() 126 return ts.tv_sec; in gettime()
|