Searched refs:abstime (Results 1 – 5 of 5) sorted by relevance
/AliOS-Things-master/components/SDL2/src/thread/pthread/ |
A D | SDL_syscond.c | 105 struct timespec abstime; in SDL_CondWaitTimeout() local 112 clock_gettime(CLOCK_REALTIME, &abstime); in SDL_CondWaitTimeout() 114 abstime.tv_nsec += (ms % 1000) * 1000000; in SDL_CondWaitTimeout() 115 abstime.tv_sec += ms / 1000; in SDL_CondWaitTimeout() 119 abstime.tv_sec = delta.tv_sec + (ms / 1000); in SDL_CondWaitTimeout() 120 abstime.tv_nsec = (delta.tv_usec + (ms % 1000) * 1000) * 1000; in SDL_CondWaitTimeout() 122 if (abstime.tv_nsec > 1000000000) { in SDL_CondWaitTimeout() 123 abstime.tv_sec += 1; in SDL_CondWaitTimeout() 124 abstime.tv_nsec -= 1000000000; in SDL_CondWaitTimeout() 128 retval = pthread_cond_timedwait(&cond->cond, &mutex->id, &abstime); in SDL_CondWaitTimeout()
|
/AliOS-Things-master/components/posix/src/ |
A D | pthread_cond.c | 185 const struct timespec *abstime) in pthread_cond_timedwait() argument 196 if (abstime == NULL) { in pthread_cond_timedwait() 205 timeout_ms = (abstime->tv_sec - now_tp.tv_sec) * 1000 + in pthread_cond_timedwait() 206 ((abstime->tv_nsec - now_tp.tv_nsec) / 1000000); in pthread_cond_timedwait() 210 timeout_ms = (abstime->tv_sec - now_tv.tv_sec) * 1000 + in pthread_cond_timedwait() 211 ((abstime->tv_nsec - now_tv.tv_usec * 1000) / 1000000); in pthread_cond_timedwait()
|
A D | pthread.c | 248 int pthread_timedjoin_np(pthread_t thread, void **retval, const struct timespec *abstime) in pthread_timedjoin_np() argument 274 if (abstime != NULL) { in pthread_timedjoin_np() 277 if ((time_now.tv_usec * 1000) > abstime->tv_nsec) { in pthread_timedjoin_np() 278 nsec = abstime->tv_nsec + 1000000000 - time_now.tv_usec * 1000; in pthread_timedjoin_np() 279 sec = abstime->tv_sec - time_now.tv_sec - 1; in pthread_timedjoin_np() 281 nsec = abstime->tv_nsec - time_now.tv_usec * 1000; in pthread_timedjoin_np() 282 sec = abstime->tv_sec - time_now.tv_sec; in pthread_timedjoin_np()
|
/AliOS-Things-master/components/posix/include/ |
A D | pthread.h | 124 int pthread_timedjoin_np(pthread_t thread, void **retval, const struct timespec *abstime); 171 …hread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime);
|
/AliOS-Things-master/components/SDL2/src/hidapi/mac/ |
A D | hid.c | 884 …onst hid_device *dev, pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) in cond_timedwait() argument 887 int res = pthread_cond_timedwait(cond, mutex, abstime); in cond_timedwait()
|
Completed in 13 milliseconds