aboutsummaryrefslogtreecommitdiff
path: root/sonogram~/sonogram~-yves.c
diff options
context:
space:
mode:
Diffstat (limited to 'sonogram~/sonogram~-yves.c')
-rw-r--r--sonogram~/sonogram~-yves.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sonogram~/sonogram~-yves.c b/sonogram~/sonogram~-yves.c
index 59cbeed..d2ce944 100644
--- a/sonogram~/sonogram~-yves.c
+++ b/sonogram~/sonogram~-yves.c
@@ -42,16 +42,13 @@
#endif
#include <ctype.h>
#include <pthread.h>
-#ifdef UNIX
-#include <unistd.h>
-#endif
-#ifdef NT
+#ifdef WIN32
#define random rand
+#define usleep(a) _sleep(a/1000)
+#include <io.h>
#include <windows.h>
-static int usleep (unsigned int us) {
- Sleep((long)(us/1000.));
- return 0;
-}
+#else
+#include <unistd.h>
#endif
#include <math.h>