Merge remote-tracking branch 'origin/master' into tc-untouchables
[ghc.git] / rts / GetTime.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team 2005
4 *
5 * Machine-independent interface to time measurement
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef GETTIME_H
10 #define GETTIME_H
11
12 #include "BeginPrivate.h"
13
14 void initializeTimer (void);
15 StgWord64 getMonotonicNSec (void);
16
17 Time getProcessCPUTime (void);
18 Time getThreadCPUTime (void);
19 Time getProcessElapsedTime (void);
20 void getProcessTimes (Time *user, Time *elapsed);
21
22 /* Get the current date and time.
23 Uses seconds since the Unix epoch, plus nanoseconds
24 */
25 void getUnixEpochTime (StgWord64 *sec, StgWord32 *nsec);
26
27 // Not strictly timing, but related
28 W_ getPageFaults (void);
29
30 #include "EndPrivate.h"
31
32 #endif /* GETTIME_H */