Skip to content
Snippets Groups Projects
Commit 625b886e authored by sof's avatar sof
Browse files

[project @ 1998-04-30 19:55:57 by sof]

Opt for times() over getrusage() on Solaris boxes
parent ffff0c11
No related merge requests found
...@@ -71,7 +71,14 @@ getCPUTime(StgByteArray cpuStruct) ...@@ -71,7 +71,14 @@ getCPUTime(StgByteArray cpuStruct)
{ {
StgInt *cpu=(StgInt *)cpuStruct; StgInt *cpu=(StgInt *)cpuStruct;
#if defined(HAVE_GETRUSAGE) && ! irix_TARGET_OS /* getrusage() is right royal pain to deal with when targetting multiple
versions of Solaris, since some versions supply it in libc (2.3 and 2.5),
while 2.4 has got it in libucb (I wouldn't be too surprised if it was back
again in libucb in 2.6..)
Avoid the problem by resorting to times() instead.
*/
#if defined(HAVE_GETRUSAGE) && ! irix_TARGET_OS && ! solaris2_TARGET_OS
struct rusage t; struct rusage t;
getrusage(RUSAGE_SELF, &t); getrusage(RUSAGE_SELF, &t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment