40 GetSystemTimeAsFileTime( &now );
41 uint64_t t = (
UINT64( now.dwHighDateTime ) << 32 ) + now.dwLowDateTime;
47#elif defined( HAVE_CLOCK_GETTIME )
55 clock_gettime( CLOCK_MONOTONIC, &now );
57 int64_t usecs = (int64_t) now.tv_sec * 1000000 + now.tv_nsec / 1000;
64#elif defined( HAVE_GETTIMEOFDAY_FUNC )
71 gettimeofday( &tv, 0 );
73 return (int64_t) tv.tv_sec * 1000000 + tv.tv_usec;
83 ss <<
"Probe stats for" <<
m_name << std::endl;
87 ss <<
"tmr: " << std::left << std::setw(30) << cp.name << std::fixed << std::setprecision(3) << cp.timerDelta << std::endl;
90 ss <<
"chp: "<< std::left << std::setw(30) << cp.name;
91 ss <<
"since last : " << std::fixed << std::setprecision(3) <<
delta_ms( cp.timestamp, prev ) <<
" ";
92 ss <<
"accumulated: " << std::fixed << std::setprecision(3) <<
delta_ms( cp.timestamp,
m_start ) << std::endl;
std::vector< CHECKPOINT > m_checkpoints
double delta_ms(TIME_POINT a, TIME_POINT b)
std::chrono::time_point< CLOCK > TIME_POINT
int64_t GetRunningMicroSecs()
An alternate way to calculate an elapsed time (in microsecondes) to class PROF_COUNTER.