blob: 57124109b03ed9040cb99e9ec7ec18de13dc9074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
$NetBSD: patch-aa,v 1.19 2006/01/30 18:36:21 joerg Exp $
--- src/tools/solver/lp_solve/lp_solve.c.orig 2005-08-25 19:28:28.000000000 +0200
+++ src/tools/solver/lp_solve/lp_solve.c
@@ -7,6 +7,7 @@
#include <stdlib.h>
#include <errno.h>
#include <time.h>
+#include <sys/time.h>
#include <sys/timeb.h>
#define LoadInverseLib FALSE
@@ -15891,10 +15892,10 @@ static double timeNow(void)
#elif defined CLOCKTIME
return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
#else
- struct timeb buf;
+ struct timeval tv;
- ftime(&buf);
- return((double)buf.time+((double) buf.millitm)/1000.0);
+ gettimeofday(&tv, NULL);
+ return((double)tv.tv_sec+((double) tv.tv_usec)/1000000.0);
#endif
}
|