42 #define AlpsCpuTime CoinCpuTime
51 #if defined(_MSC_VER) || defined(__MSVCRT__)
52 unsigned int ticksnow;
53 ticksnow = (
unsigned int)clock();
54 cpu_temp = (double)((
double)ticksnow/CLOCKS_PER_SEC);
59 getrusage(RUSAGE_SELF,&usage);
60 cpu_temp = (double) usage.ru_utime.tv_sec;
61 cpu_temp += 1.0e-6*((
double) usage.ru_utime.tv_usec);
62 sys_temp = (double) usage.ru_stime.tv_sec
63 + 1.e-6 * (
double) usage.ru_stime.tv_usec;
65 return cpu_temp + sys_temp;
static double AlpsWallClock()
double getWallClock()
Get cpu timee.
void setClockType(int ct)
double wall_
Wall clock time.
int getClockType()
Get/Set clock type.
bool reachCpuLimit()
Check if cpu time reach limit.
void stop()
Stop timer and computing times.
bool reachWallLimit()
Check if wallclock time reach limit.
void start()
Start to count times.
double getTime()
Get time depends on clock type.
double getCpuTime()
Get cpu timee.