mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 02:01:03 +00:00
(HAVE_TIMES): Use this instead of test for solaris and hpux.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@214 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1cef8182cf
commit
f80a7defe0
1 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@
|
|||
#include <ucbinclude/sys/resource.h>
|
||||
#endif
|
||||
|
||||
#if (sun && __svr4__) || (__hpux)
|
||||
#if HAVE_TIMES
|
||||
#include <sys/times.h>
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue