Commit 4d014d82 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix timer test

parent d2e0d7fe
...@@ -61,6 +61,7 @@ int main (void) ...@@ -61,6 +61,7 @@ int main (void)
vlc_timer_schedule (&data.timer, false, 1, CLOCK_FREQ / 10); vlc_timer_schedule (&data.timer, false, 1, CLOCK_FREQ / 10);
msleep (CLOCK_FREQ); msleep (CLOCK_FREQ);
vlc_mutex_lock (&data.lock); vlc_mutex_lock (&data.lock);
data.count += vlc_timer_getoverrun (&data.timer);
printf ("Count = %u\n", data.count); printf ("Count = %u\n", data.count);
assert (data.count >= 10); assert (data.count >= 10);
data.count = 0; data.count = 0;
...@@ -73,6 +74,7 @@ int main (void) ...@@ -73,6 +74,7 @@ int main (void)
vlc_timer_schedule (&data.timer, true, now, CLOCK_FREQ / 10); vlc_timer_schedule (&data.timer, true, now, CLOCK_FREQ / 10);
msleep (CLOCK_FREQ); msleep (CLOCK_FREQ);
vlc_mutex_lock (&data.lock); vlc_mutex_lock (&data.lock);
data.count += vlc_timer_getoverrun (&data.timer);
printf ("Count = %u\n", data.count); printf ("Count = %u\n", data.count);
assert (data.count >= 10); assert (data.count >= 10);
vlc_mutex_unlock (&data.lock); vlc_mutex_unlock (&data.lock);
......
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