]> git.sesse.net Git - vlc/blobdiff - src/test/timer.c
Cleanup vlc_timer_* prototypes
[vlc] / src / test / timer.c
index 00a806c7bd5ced2ba8db28f49ea54456cc01f78d..c50da1d7c794d4f81e5c1b1177486b24e4aa208f 100644 (file)
@@ -41,7 +41,7 @@ static void callback (void *ptr)
     struct timer_data *data = ptr;
 
     vlc_mutex_lock (&data->lock);
-    data->count += 1 + vlc_timer_getoverrun (&data->timer);
+    data->count += 1 + vlc_timer_getoverrun (data->timer);
     vlc_mutex_unlock (&data->lock);
 }
 
@@ -58,28 +58,28 @@ int main (void)
     assert (val == 0);
 
     /* Relative timer */
-    vlc_timer_schedule (&data.timer, false, 1, CLOCK_FREQ / 10);
+    vlc_timer_schedule (data.timer, false, 1, CLOCK_FREQ / 10);
     msleep (CLOCK_FREQ);
     vlc_mutex_lock (&data.lock);
-    data.count += vlc_timer_getoverrun (&data.timer);
+    data.count += vlc_timer_getoverrun (data.timer);
     printf ("Count = %u\n", data.count);
     assert (data.count >= 10);
     data.count = 0;
     vlc_mutex_unlock (&data.lock);
-    vlc_timer_schedule (&data.timer, false, 0, 0);
+    vlc_timer_schedule (data.timer, false, 0, 0);
 
     /* Absolute timer */
     mtime_t now = mdate ();
 
-    vlc_timer_schedule (&data.timer, true, now, CLOCK_FREQ / 10);
+    vlc_timer_schedule (data.timer, true, now, CLOCK_FREQ / 10);
     msleep (CLOCK_FREQ);
     vlc_mutex_lock (&data.lock);
-    data.count += vlc_timer_getoverrun (&data.timer);
+    data.count += vlc_timer_getoverrun (data.timer);
     printf ("Count = %u\n", data.count);
     assert (data.count >= 10);
     vlc_mutex_unlock (&data.lock);
 
-    vlc_timer_destroy (&data.timer);
+    vlc_timer_destroy (data.timer);
     vlc_mutex_destroy (&data.lock);
 
     return 0;