/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: getCPUTime.c,v 1.5 1999/05/03 13:22:29 sof Exp $
+ * $Id: getCPUTime.c,v 1.6 1999/09/30 15:50:02 sof Exp $
*
* getCPUTime Runtime Support
*/
*/
#ifndef _WIN32
-StgByteArray
+StgInt
getCPUTime(StgByteArray cpuStruct)
{
StgInt *cpu=(StgInt *)cpuStruct;
cpu[3] = (t.tms_stime - cpu[2] * ticks) * (1000000000 / ticks);
# else
- return NULL;
+ return 0;
# endif
#endif
- return (StgByteArray) cpuStruct;
+ return 1;
}
#else
#endif
/* cygwin32 or mingw32 version */
-StgByteArray
+StgInt
getCPUTime(StgByteArray cpuStruct)
{
FILETIME creationTime, exitTime, kernelTime, userTime;
cpu[1]=0;
cpu[2]=0;
cpu[3]=0;
- return (StgByteArray)cpu;
+ return 1;
}
FT2usecs(uT, userTime);
cpu[1] = (unsigned int)(uT * 100);
cpu[0] = (unsigned int)(kT / NS_PER_SEC);
cpu[1] = (unsigned int)(kT * 100);
- return (StgByteArray)cpu;
+ return 1;
}
#endif /* _WIN32 */