ck-ldb/LBMachineUtil.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * $Source: /cvsroot/charm/src/ck-ldb/LBMachineUtil.h,v $
00003  * $Author: gzheng $
00004  * $Date: 2005-03-21 20:38:09 $
00005  * $Revision: 1.7 $
00006  *****************************************************************************/
00007 
00012 
00013 #ifndef _LDMACHINEUTIL_H_
00014 #define _LDMACHINEUTIL_H_
00015 
00016 class LBMachineUtil {
00017 public:
00018   LBMachineUtil();
00019   void StatsOn();
00020   void StatsOff();
00021   void Clear();
00022   void TotalTime(double* walltime, double* cputime);
00023   void IdleTime(double* walltime) { *walltime = total_idletime; };
00024 
00025 private:
00026   enum { off, on } state;
00027   double total_walltime;
00028   double total_cputime;
00029   double total_idletime;
00030   double start_totalwall;
00031   double start_totalcpu;
00032   double start_idle;
00033 
00034   int cancel_idleStart, cancel_idleEnd;
00035 
00036   void IdleStart(double curWallTime);
00037   void IdleEnd(double curWallTime);
00038   static void staticIdleStart(LBMachineUtil *util,double curWallTime);
00039   static void staticIdleEnd(LBMachineUtil *util,double curWallTime);
00040 };
00041 
00042 #endif  // _LDMACHINEUTIL_H_
00043 

Generated on Sun Jun 29 13:29:10 2008 for Charm++ by  doxygen 1.5.1