GetTime.h 825 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 2005
 *
 * Machine-independent interface to time measurement
 *
 * ---------------------------------------------------------------------------*/

#ifndef GETTIME_H
#define GETTIME_H

12
#include "BeginPrivate.h"
13

14 15 16
void initializeTimer       (void);
StgWord64 getMonotonicNSec (void);

Simon Marlow's avatar
Simon Marlow committed
17 18 19 20
Time getProcessCPUTime     (void);
Time getThreadCPUTime      (void);
Time getProcessElapsedTime (void);
void getProcessTimes       (Time *user, Time *elapsed);
21

22 23 24 25 26
/* Get the current date and time.
   Uses seconds since the Unix epoch, plus nanoseconds
 */
void  getUnixEpochTime      (StgWord64 *sec, StgWord32 *nsec);

27 28 29
// Not strictly timing, but related
nat   getPageFaults         (void);

30
#include "EndPrivate.h"
31

32
#endif /* GETTIME_H */