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

9
#pragma once
10

11
#include "BeginPrivate.h"
12

13 14
void initializeTimer       (void);

Simon Marlow's avatar
Simon Marlow committed
15
Time getProcessCPUTime     (void);
16
Time getMyThreadCPUTime    (void);
Simon Marlow's avatar
Simon Marlow committed
17
void getProcessTimes       (Time *user, Time *elapsed);
18

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

24
// Not strictly timing, but related
Ian Lynagh's avatar
Ian Lynagh committed
25
W_    getPageFaults         (void);
26

27
#include "EndPrivate.h"