[project @ 2003-02-22 04:51:50 by sof]
[ghc-hetmet.git] / ghc / rts / Timer.h
diff --git a/ghc/rts/Timer.h b/ghc/rts/Timer.h
new file mode 100644 (file)
index 0000000..e13570f
--- /dev/null
@@ -0,0 +1,22 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 1995-2003
+ *
+ * Interval timer service for profiling and pre-emptive scheduling.
+ *
+ * ---------------------------------------------------------------------------*/
+#ifndef __TIMER_H__
+#define __TIMER_H__
+
+# define TICK_FREQUENCY   50                      /* ticks per second */
+# define TICK_MILLISECS   (1000/TICK_FREQUENCY)   /* ms per tick */
+
+/* Context switch timing constants. Context switches happen after a
+ * whole number of ticks, the default being every tick.
+ */
+#define CS_MIN_MILLISECS TICK_MILLISECS       /* milliseconds per slice */
+
+extern void handle_tick(int unused);
+extern int startTimer(nat ms);
+extern int stopTimer(void);
+#endif /* __TIMER_H__ */