25 #include <vigra/windows.h>
32 #define TIMETRACE(TEXT, CODE) { std::ostringstream buf; utils::os_TIME t1,t2; utils::os_GetTime(&t1); CODE; \
33 utils::os_GetTime(&t2); buf << TEXT << " took " << utils::os_TimeDiff(&t2,&t1)/1000.0 << " seconds." << std::endl; std::cout << buf.str(); }
50 *time = GetTickCount();
53 gettimeofday(time, &tz);
60 return *time1 - *time2;
62 return (
int)((double)time1->tv_sec*1000 + ((
double)time1->tv_usec)*1e-3 -
63 (
double)time2->tv_sec*1000 - ((double)time2->tv_usec)*1e-3);
int os_TimeDiff(os_TIME *time1, os_TIME *time2)
unsigned long long getTotalMemory()
returns the total memory in byte
unsigned int GetPhysicalCPUCount()
return the number of physical cpu cores
void os_GetTime(os_TIME *time)