\subsection[getCPUTime.lc]{getCPUTime Runtime Support}
\begin{code}
+#define NON_POSIX_SOURCE /*needed for solaris2 only?*/
+/* how is this to work given we have not read platform.h yet? */
#ifdef hpux_TARGET_OS
#define _INCLUDE_HPUX_SOURCE
#endif
* seconds to overflow 31 bits.
*/
-StgAddr
-getCPUTime(STG_NO_ARGS)
+StgByteArray
+getCPUTime(cpuStruct)
+StgByteArray cpuStruct;
{
- static StgInt cpu[4];
+ StgInt *cpu=(StgInt *)cpuStruct;
#if defined(HAVE_GETRUSAGE) && ! irix_TARGET_OS
struct rusage t;
return NULL;
# endif
#endif
- return (StgAddr) cpu;
+ return (StgByteArray) cpuStruct;
}
\end{code}