changeset 9829:0f2cc9ef24f6

gettimeofday() emulation using ftime()
author faust3
date Fri, 04 Apr 2003 19:27:46 +0000
parents c5fd755db576
children e2134d2f18fb
files osdep/gettimeofday.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/osdep/gettimeofday.c	Fri Apr 04 19:27:46 2003 +0000
@@ -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