diff src/utils.cc @ 4086:ddc722b38e87

[project @ 2002-10-03 19:08:45 by jwe]
author jwe
date Thu, 03 Oct 2002 19:08:45 +0000
parents b4fa31442a78
children 5a82e874999b
line wrap: on
line diff
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -749,6 +749,22 @@
   return retval;
 }
 
+void
+octave_sleep (double seconds)
+{
+  if (seconds > 0)
+    {
+      double t;
+
+      unsigned int usec = modf (seconds, &t) * 1000000;
+
+      unsigned int sec = (t > UINT_MAX) ? UINT_MAX : (unsigned int) t;
+
+      octave_sleep (sec);
+      octave_usleep (usec);
+    }
+}
+
 static int
 treat_neg_dim_as_zero (void)
 {