34 #include "CoinTime.hpp"
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;
167 if (finishCpu_ - startCpu_ > limit_) {
179 if (finishWall_ - startWall_ > limit_) {
double wall_
Wall clock time.
void stop()
Stop timer and computing times.
bool reachWallLimit()
Check if wallclock time reach limit.
double getCpuTime()
Get cpu timee.
int getClockType()
Get/Set clock type.
double getTime()
Get time depends on clock type.
bool reachCpuLimit()
Check if cpu time reach limit.
static double AlpsWallClock()
void start()
Start to count times.
void setClockType(int ct)
double getWallClock()
Get cpu timee.