aboutsummaryrefslogtreecommitdiff
path: root/threadlib/src/sleep.c
diff options
context:
space:
mode:
authorGeorg Holzmann <grholzi@users.sourceforge.net>2005-11-20 21:29:12 +0000
committerGeorg Holzmann <grholzi@users.sourceforge.net>2005-11-20 21:29:12 +0000
commit171485daa08e97782c05b3ca7490e6e42b827197 (patch)
tree373ba2e33f38e4435a93f457aeddb85cd88744a6 /threadlib/src/sleep.c
parent3cef5d2ec589e3da66a66b27d7521af096bd9300 (diff)
version 0.1
svn path=/trunk/externals/grh/; revision=3989
Diffstat (limited to 'threadlib/src/sleep.c')
-rwxr-xr-xthreadlib/src/sleep.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/threadlib/src/sleep.c b/threadlib/src/sleep.c
index f800074..9f9eaab 100755
--- a/threadlib/src/sleep.c
+++ b/threadlib/src/sleep.c
@@ -21,7 +21,14 @@
*/
#include "threadlib.h"
+
+// include for sleep
+#ifdef MSW
+#include <windows.h>
+#define sleep(t) Sleep(1000*(t))
+#else
#include <unistd.h>
+#endif
static t_class *sleep_class;
@@ -41,9 +48,7 @@ static void sleep_float(t_sleep * x, t_float f)
static void *sleep_new(void)
{
t_sleep *x = (t_sleep *)pd_new(sleep_class);
-
x->x_outlet = outlet_new(&x->x_obj,&s_float);
-
return (void *)x;
}