diff lib-src/profile.c @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents c5d627a313b1
children de805c49cfc1
line wrap: on
line diff
--- a/lib-src/profile.c	Mon Aug 13 11:12:06 2007 +0200
+++ b/lib-src/profile.c	Mon Aug 13 11:13:30 2007 +0200
@@ -32,7 +32,7 @@
  **  abstraction : a stopwatch
  **  operations: reset_watch, get_time
  */
-#include <../src/config.h>
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include "../src/systime.h"
@@ -41,6 +41,25 @@
 static int watch_not_started = 1; /* flag */
 static char time_string[30];
 
+#ifdef WINDOWSNT
+#include <sys/timeb.h>
+/* Emulate gettimeofday (Ulrich Leodolter, 1/11/95).  */
+void 
+gettimeofday (struct timeval *tv, struct timezone *tz)
+{
+  struct _timeb tb;
+  _ftime (&tb);
+
+  tv->tv_sec = tb.time;
+  tv->tv_usec = tb.millitm * 1000L;
+  if (tz) 
+    {
+      tz->tz_minuteswest = tb.timezone;	/* minutes west of Greenwich  */
+      tz->tz_dsttime = tb.dstflag;	/* type of dst correction  */
+    }
+}
+#endif
+
 /* Reset the stopwatch to zero.  */
 
 static void