]> git.sesse.net Git - vlc/commitdiff
test: Use vlc's msleep. Only portable and working implementation we have.
authorPierre d'Herbemont <pdherbemont@free.fr>
Fri, 5 Jun 2009 07:50:42 +0000 (00:50 -0700)
committerPierre d'Herbemont <pdherbemont@free.fr>
Fri, 5 Jun 2009 07:50:42 +0000 (00:50 -0700)
Pointed by Remi.

test/libvlc/media_list_player.c

index 65aa65be693c27c6e59b565a5beaa03da73bac65..56fbb437dd01392bc006976fe88b95f32d1f400f 100644 (file)
 
 #include "test.h"
 
+ // For msleep
+#include <vlc_common.h>
+#include <vlc_mtime.h>
+
 static void media_list_add_file_path(libvlc_instance_t *vlc, libvlc_media_list_t *ml, const char * file_path)
 {
     libvlc_media_t *md = libvlc_media_new (vlc, file_path, &ex);
@@ -73,7 +77,7 @@ static void test_media_list_player_next(const char** argv, int argc)
 
     libvlc_media_release (md);
 
-    usleep(100000);
+    msleep(100000);
     
     libvlc_media_list_player_next (mlp, &ex);
     catch ();
@@ -81,7 +85,7 @@ static void test_media_list_player_next(const char** argv, int argc)
     libvlc_media_list_player_pause (mlp, &ex);
     catch();
 
-    usleep(100000);
+    msleep(100000);
     
     libvlc_media_list_player_next (mlp, &ex);
     catch ();
@@ -89,7 +93,7 @@ static void test_media_list_player_next(const char** argv, int argc)
     libvlc_media_list_player_stop (mlp, &ex);
     catch ();
 
-    usleep(100000);
+    msleep(100000);
     
     libvlc_media_list_player_next (mlp, &ex);
     catch ();