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;
double getCpuTime()
Get cpu timee.
void setClockType(int ct)
double wall_
Wall clock time.
void start()
Start to count times.
void stop()
Stop timer and computing times.
static double AlpsWallClock()
bool reachWallLimit()
Check if wallclock time reach limit.
double getWallClock()
Get cpu timee.
bool reachCpuLimit()
Check if cpu time reach limit.
int getClockType()
Get/Set clock type.
double getTime()
Get time depends on clock type.