summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/gettimeofday.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/osdep/gettimeofday.c b/osdep/gettimeofday.c
new file mode 100644
index 0000000000..2d8baa6e90
--- /dev/null
+++ b/osdep/gettimeofday.c
@@ -0,0 +1,11 @@
+
+#ifndef HAVE_GETTIMEOFDAY
+#include <sys/time.h>
+#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;
+}
+#endif