1 /* -----------------------------------------------------------------------------
2 * $Id: Proftimer.c,v 1.2 1998/12/02 13:28:36 simonm Exp $
4 * (c) The GHC Team, 1998
6 * Profiling interval timer
8 * ---------------------------------------------------------------------------*/
10 /* Only have cost centres etc if PROFILING defined */
12 #if defined (PROFILING)
17 #include "Proftimer.h"
21 nat current_interval = 1; /* Current interval number --
24 nat interval_ticks = DEFAULT_INTERVAL; /* No of ticks in an interval */
26 nat previous_ticks = 0; /* ticks in previous intervals */
27 nat current_ticks = 0; /* ticks in current interval */
32 if (initialize_virtual_timer(ms)) {
34 fprintf(stderr, "Can't initialize virtual timer.\n");
35 stg_exit(EXIT_FAILURE);
41 { /* Stops time profile */
49 { /* Starts time profile */
51 initProfTimer(TICK_MILLISECS);
62 #endif /* PROFILING */