Commit 35664fc8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

timer: speed up test case

parent 81705747
......@@ -22,13 +22,14 @@
# include "config.h"
#endif
#include <vlc_common.h>
#include <stdio.h>
#include <stdlib.h>
#undef NDEBUG
#include <assert.h>
#include <vlc_common.h>
#undef msleep
struct timer_data
{
vlc_timer_t timer;
......@@ -58,8 +59,8 @@ int main (void)
assert (val == 0);
/* Relative timer */
vlc_timer_schedule (data.timer, false, 1, CLOCK_FREQ / 10);
msleep (CLOCK_FREQ);
vlc_timer_schedule (data.timer, false, 1, CLOCK_FREQ / 100);
msleep (CLOCK_FREQ / 10);
vlc_mutex_lock (&data.lock);
data.count += vlc_timer_getoverrun (data.timer);
printf ("Count = %u\n", data.count);
......@@ -71,8 +72,8 @@ int main (void)
/* Absolute timer */
mtime_t now = mdate ();
vlc_timer_schedule (data.timer, true, now, CLOCK_FREQ / 10);
msleep (CLOCK_FREQ);
vlc_timer_schedule (data.timer, true, now, CLOCK_FREQ / 100);
msleep (CLOCK_FREQ / 10);
vlc_mutex_lock (&data.lock);
data.count += vlc_timer_getoverrun (data.timer);
printf ("Count = %u\n", data.count);
......
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