diff --git a/Source/Time.m b/Source/Time.m index 184fcab05..2229057e0 100644 --- a/Source/Time.m +++ b/Source/Time.m @@ -30,7 +30,7 @@ #include #endif -#if (sun && __svr4__) || (__hpux) +#if HAVE_TIMES #include #endif @@ -95,7 +95,7 @@ id monthNames; + (long) millisecondsToRun: (void(*)())aFunc { -#if (sun && __svr4__) || (__hpux) +#if HAVE_TIMES /* As of Solaris 2.4, getrusage is not supported with the system libraries or with multi-threaded applications. Thus, we use the times() call instead. */ @@ -124,14 +124,14 @@ id monthNames; + getSeconds: (long *)sec microseconds: (long *)usec toRun: (void(*)())aFunc { -#if (sun && __svr4__) || (__hpux) +#if HAVE_TIMES struct tms start_tms, end_tms; #else struct rusage start_ru, end_ru; #endif /* solaris */ [self notImplemented:_cmd]; -#if (sun && __svr4__) || (__hpux) +#if HAVE_TIMES times(&start_tms); (*aFunc)(); times(&end_tms);