summaryrefslogtreecommitdiff
path: root/rts/GetTime.h
blob: 11da6411641e94f180b90e46268d49224c997829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 2005
 *
 * Machine-independent interface to time measurement
 *
 * ---------------------------------------------------------------------------*/

#ifndef GETTIME_H
#define GETTIME_H

#pragma GCC visibility push(hidden)

// We'll use a fixed resolution of usec for now.  The machine
// dependent implementation may have a different resolution, but we'll
// normalise to this for the machine independent interface.
#define TICKS_PER_SECOND 1000000
typedef StgInt64 Ticks;

Ticks getProcessCPUTime     (void);
Ticks getThreadCPUTime      (void);
Ticks getProcessElapsedTime (void);
void  getProcessTimes       (Ticks *user, Ticks *elapsed);

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

#pragma GCC visibility pop

#endif /* GETTIME_H */