Commit f5e9d0f6 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rémi Denis-Courmont

os2: thread: use gettimeofday() instead of time()

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent f8f9b3f6
......@@ -343,9 +343,15 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
mtime_t total;
switch (p_condvar->clock)
{
case CLOCK_REALTIME: /* FIXME? sub-second precision */
total = CLOCK_FREQ * time (NULL);
case CLOCK_REALTIME:
{
struct timeval tv;
gettimeofday (&tv, NULL);
total = CLOCK_FREQ * tv.tv_sec +
CLOCK_FREQ * tv.tv_usec / 1000000L;
break;
}
default:
assert (p_condvar->clock == CLOCK_MONOTONIC);
total = mdate();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment