diff options
Diffstat (limited to 'tests.c')
-rw-r--r-- | tests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -42,7 +42,7 @@ timer(int flag) #if !defined(SYSV) static struct timeval starttime; /* starting time for gettimeofday() */ struct timeval endtime; /* ending time for gettimeofday() */ -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) static struct rusage startusage; /* starting time for getrusage() */ struct rusage endusage; /* ending time for getrusage() */ #endif @@ -53,13 +53,13 @@ timer(int flag) switch (flag) { case StartTimer: /* store initial values */ gettimeofday(&starttime,&tz); -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) getrusage(RUSAGE_SELF,&startusage); #endif return((long) NULL); case EndTimer: gettimeofday(&endtime,&tz); /* store final values */ -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) getrusage(RUSAGE_SELF,&endusage); #endif @@ -67,7 +67,7 @@ timer(int flag) elapsed time = ending time - starting time, but there are three different timers and two different units of time, ack... */ -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) elapsedtime = (long) ((long) ((endtime.tv_sec - endusage.ru_utime.tv_sec - endusage.ru_stime.tv_sec - starttime.tv_sec + startusage.ru_utime.tv_sec |