/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.112 2002/01/24 02:06:48 sof Exp $
+ * $Id: Schedule.c,v 1.113 2002/01/24 07:50:02 sof Exp $
*
* (c) The GHC Team, 1998-2000
*
initCapability(&MainCapability);
#endif
-#if defined(SMP) || defined(PAR)
+#if /* defined(SMP) ||*/ defined(PAR)
initSparkPools();
#endif
}
task_ids[i].mut_etime = 0.0;
task_ids[i].gc_time = 0.0;
task_ids[i].gc_etime = 0.0;
- task_ids[i].elapsedtimestart = elapsedtime();
+ task_ids[i].elapsedtimestart = stat_getElapsedTime();
IF_DEBUG(scheduler,fprintf(stderr,"scheduler: Started task: %ld\n",tid););
}
}
/* -----------------------------------------------------------------------------
- * $Id: Stats.c,v 1.41 2001/11/28 14:29:59 simonmar Exp $
+ * $Id: Stats.c,v 1.42 2002/01/24 07:50:01 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
nat i;
pthread_t me = pthread_self();
+ getTimes();
+
for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
if (task_ids[i].id == me) {
- task_ids[i].mut_time = usertime() - task_ids[i].gc_time;
- task_ids[i].mut_etime = elapsedtime()
+ task_ids[i].mut_time = CurrentUserTime - task_ids[i].gc_time;
+ task_ids[i].mut_etime = CurrentElapsedTime
- GCe_tot_time
- task_ids[i].elapsedtimestart;
if (task_ids[i].mut_time < 0.0) { task_ids[i].mut_time = 0.0; }
}
}
}
+
+long int stat_getElapsedTime ()
+{
+ getTimes();
+ return CurrentElapsedTime;
+}
#endif
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Stats.h,v 1.14 2001/11/26 16:54:22 simonmar Exp $
+ * $Id: Stats.h,v 1.15 2002/01/24 07:50:02 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
extern void statDescribeGens( void );
extern HsInt getAllocations( void );
+
+#ifdef SMP
+extern long int stat_getElapsedTime ( void );
+#endif