[project @ 2000-05-11 15:11:24 by panne]
[ghc-hetmet.git] / ghc / rts / Itimer.c
index cb7df62..60e30e7 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Itimer.c,v 1.11 2000/03/20 09:42:49 andy Exp $
+ * $Id: Itimer.c,v 1.13 2000/04/03 15:54:49 simonmar Exp $
  *
  * (c) The GHC Team, 1995-1999
  *
@@ -24,6 +24,7 @@
 
 #include "Rts.h"
 #include "Itimer.h"
+#include "Proftimer.h"
 #include "Schedule.h"
 
 /* As recommended in the autoconf manual */
@@ -43,7 +44,6 @@
 #endif
  
 lnat total_ticks = 0;
-rtsBool do_prof_ticks = rtsFalse;
 
 static
 void
@@ -73,9 +73,7 @@ handle_tick(int unused STG_UNUSED)
   total_ticks++;
 
 #ifdef PROFILING
-  if (do_prof_ticks == rtsTrue) {
-    CCS_TICK(CCCS);
-  }
+  handleProfTick();
 #endif
 
   /* For threadDelay etc., see Select.c */
@@ -239,6 +237,7 @@ unblock_vtalrm_signal(void)
 }
 #endif
 
+#if !defined(HAVE_SETITIMER) && !defined(mingw32_TARGET_OS)
 unsigned int 
 getourtimeofday(void)
 {
@@ -246,3 +245,4 @@ getourtimeofday(void)
   gettimeofday(&tv, (struct timezone *) NULL);
   return (tv.tv_sec * 1000000 + tv.tv_usec);
 }
+#endif