0
warten, was, wenn condition_timed_wiat() Zeit verstreicht passiert, wenn Wartezustandsgröße in Linuxwas passiert, wenn condition_timed_wiat verstreicht Zeit, wenn für die Zustandsgröße in Linux
struct timeval tv;
struct timespec ts;
gettimeofday(&tv, NULL);
ts.tv_sec = time(NULL) + timeInMs/1000;
ts.tv_nsec = tv.tv_usec * 1000 + 1000 * 1000 * (timeInMs % 1000);
ts.tv_sec += ts.tv_nsec/(1000 * 1000 * 1000);
ts.tv_nsec %= (1000 * 1000 * 1000);
n = pthread_cond_timedwait(&condition, &mutex, &ts);