[project @ 2005-04-22 12:28:00 by simonmar]
[ghc-hetmet.git] / ghc / rts / Timer.h
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team, 1995-2003
4  *
5  * Interval timer service for profiling and pre-emptive scheduling.
6  *
7  * ---------------------------------------------------------------------------*/
8 #ifndef __TIMER_H__
9 #define __TIMER_H__
10
11 # define TICK_MILLISECS   (1000/TICK_FREQUENCY)   /* ms per tick */
12
13 /* Context switch timing constants. Context switches happen after a
14  * whole number of ticks, the default being every tick.
15  */
16 #define CS_MIN_MILLISECS TICK_MILLISECS       /* milliseconds per slice */
17
18 typedef void (*TickProc)(int);
19
20 extern int startTimer(nat ms);
21 extern int stopTimer(void);
22 #endif /* __TIMER_H__ */