changeset 9764:f5c4c9bb9451

MINGW32 port
author faust3
date Sun, 30 Mar 2003 20:48:51 +0000
parents 7e5d9bf1e56f
children 2d703cd325ee
files TOOLS/cpuinfo.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/cpuinfo.c	Sun Mar 30 20:37:54 2003 +0000
+++ b/TOOLS/cpuinfo.c	Sun Mar 30 20:48:51 2003 +0000
@@ -2,6 +2,18 @@
 #include <stdio.h>
 #include <sys/time.h>
 
+#ifdef __MINGW32__
+#include <sys/timeb.h>
+void gettimeofday(struct timeval* t,void* timezone)
+{       struct timeb timebuffer;
+        ftime( &timebuffer );
+        t->tv_sec=timebuffer.time;
+        t->tv_usec=1000*timebuffer.millitm;
+}
+#define MISSING_USLEEP
+#define sleep(t) _sleep(1000*t);
+#endif
+
 #ifdef M_UNIX
 typedef long long int64_t;
 #define	MISSING_USLEEP