ignore idle timers for BigSim, changed CmiWallTimer to CkWallTimer() to better handle...
[charm.git] / src / ck-ldb / LBMachineUtil.h
1 /*****************************************************************************
2  * $Source$
3  * $Author$
4  * $Date$
5  * $Revision$
6  *****************************************************************************/
7
8 /**
9  * \addtogroup CkLdb
10 */
11 /*@{*/
12
13 #ifndef _LDMACHINEUTIL_H_
14 #define _LDMACHINEUTIL_H_
15
16 #include "charm++.h"
17
18 class LBMachineUtil {
19 public:
20   LBMachineUtil();
21   void StatsOn();
22   void StatsOff();
23   void Clear();
24   void TotalTime(double* walltime, double* cputime);
25   void IdleTime(double* walltime) { *walltime = total_idletime; };
26
27 private:
28   enum { off, on } state;
29   double total_walltime;
30   double total_cputime;
31   double total_idletime;
32   double start_totalwall;
33   double start_totalcpu;
34   double start_idle;
35
36   int cancel_idleStart, cancel_idleEnd;
37
38   void IdleStart(double curWallTime);
39   void IdleEnd(double curWallTime);
40   static void staticIdleStart(LBMachineUtil *util,double curWallTime);
41   static void staticIdleEnd(LBMachineUtil *util,double curWallTime);
42 };
43
44 #endif  // _LDMACHINEUTIL_H_
45
46 /*@}*/