summaryrefslogtreecommitdiff
path: root/rts/GetTime.h
blob: 8e293a8d2265263fa8b2d7c090151c7a4190b143 (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
31
32
33
34
35
36
37
38
39
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 2005
 *
 * Machine-independent interface to time measurement
 *
 * ---------------------------------------------------------------------------*/

#ifndef GETTIME_H
#define GETTIME_H

#include "BeginPrivate.h"

void initializeTimer       (void);

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

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

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

#include "EndPrivate.h"

#endif /* GETTIME_H */

// Local Variables:
// mode: C
// fill-column: 80
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// End: