1 /* -----------------------------------------------------------------------------
2 * $Id: Itimer.h,v 1.7 2000/08/25 13:12:07 simonmar Exp $
4 * (c) The GHC Team 1998-1999
6 * Interval timer for profiling and pre-emptive scheduling.
8 * ---------------------------------------------------------------------------*/
10 # define TICK_FREQUENCY 50 /* ticks per second */
11 # define TICK_MILLISECS (1000/TICK_FREQUENCY) /* ms per tick */
13 /* Context switch timing constants. Context switches happen after a
14 * whole number of ticks, the default being every tick.
16 #define CS_MIN_MILLISECS TICK_MILLISECS /* milliseconds per slice */
18 extern rtsBool do_prof_ticks; /* profiling ticks on/off */
20 /* Total number of ticks since startup */
21 extern lnat total_ticks;
23 nat initialize_virtual_timer ( nat ms );
24 int install_vtalrm_handler ( void );
25 void block_vtalrm_signal ( void );
26 void unblock_vtalrm_signal ( void );
27 unsigned int getourtimeofday ( void );