36 GetSystemTimeAsFileTime( &now );
37 uint64_t t = (
UINT64( now.dwHighDateTime ) << 32 ) + now.dwLowDateTime;
43#elif defined( HAVE_CLOCK_GETTIME )
51 clock_gettime( CLOCK_MONOTONIC, &now );
53 int64_t usecs = (int64_t) now.tv_sec * 1000000 + now.tv_nsec / 1000;
60#elif defined( HAVE_GETTIMEOFDAY_FUNC )
67 gettimeofday( &tv, 0 );
69 return (int64_t) tv.tv_sec * 1000000 + tv.tv_usec;
79 ss <<
"Probe stats for" <<
m_name << std::endl;
83 ss <<
"tmr: " << std::left << std::setw(30) << cp.name << std::fixed << std::setprecision(3) << cp.timerDelta << std::endl;
86 ss <<
"chp: "<< std::left << std::setw(30) << cp.name;
87 ss <<
"since last : " << std::fixed << std::setprecision(3) <<
delta_ms( cp.timestamp, prev ) <<
" ";
88 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.