6b882c7c6a
stime(2) on Linux.
24 lines
859 B
Text
24 lines
859 B
Text
$NetBSD: patch-ae,v 1.1 2004/06/16 15:33:00 minskim Exp $
|
|
|
|
--- src/resusage.h.orig 1992-07-15 17:17:48.000000000 -0500
|
|
+++ src/resusage.h
|
|
@@ -52,16 +52,16 @@ struct tms timestuff;
|
|
/* define macros for time and resident memory usage checks */
|
|
|
|
static double dtime = 0.0;
|
|
-static long stime, utime;
|
|
+static long _stime, utime;
|
|
|
|
#ifdef NOTOTHER
|
|
|
|
#ifdef FOUR /* 4.2,3BSD (tested: Sun4, IBM6000, DEC5000) */
|
|
#define starttimer getrusage(RUSAGE_SELF, ×tuff); \
|
|
-stime = timestuff.ru_utime.tv_sec; \
|
|
+_stime = timestuff.ru_utime.tv_sec; \
|
|
utime = timestuff.ru_utime.tv_usec
|
|
#define stoptimer getrusage(RUSAGE_SELF, ×tuff); \
|
|
-dtime = (double)(timestuff.ru_utime.tv_sec - stime) \
|
|
+dtime = (double)(timestuff.ru_utime.tv_sec - _stime) \
|
|
+ 1.0e-6*(double)(timestuff.ru_utime.tv_usec - utime)
|
|
#define DUMPRSS /* */
|
|
#endif /* FOUR */
|