[beast/win32] Use g_usleep as portable alternative to sleep.



commit 3ffde0cbad74077c271ea42f1e9acdd987850a66
Author: Stefan Westerfeld <stefan space twc de>
Date:   Fri Sep 4 19:12:34 2009 +0200

    Use g_usleep as portable alternative to sleep.
    
    Based on 009_inline_lib_make.diff.

 tests/bse/cxxbinding.cc |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/bse/cxxbinding.cc b/tests/bse/cxxbinding.cc
index 5576086..5a8b831 100644
--- a/tests/bse/cxxbinding.cc
+++ b/tests/bse/cxxbinding.cc
@@ -29,8 +29,11 @@ void do_sleep (int seconds)
    * sleeps at least the required time, even in the presence of signals
    * for instance due to (gdb)
    */
+  g_usleep (seconds * G_USEC_PER_SEC);
+#if 0
   while (seconds > 0)
     seconds = sleep (seconds);
+#endif
 }
 
 int
@@ -123,7 +126,7 @@ main (int   argc,
   Project project = server.use_new_project ("foo");
   project.restore_from_file (file_name);
   project.play();
-  sleep (3);
+  do_sleep (3);
   g_print ("done.\n");
 
   sfi_glue_context_pop ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]