76#if !(defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64))
77# include <sys/times.h>
100 extern clock_t times(
struct tms*);
122 bool fValidTimes{
false };
123 using clock_type = std::chrono::high_resolution_clock;
124 std::chrono::time_point<clock_type> fStartRealTime, fEndRealTime;
125 tms fStartTimes, fEndTimes;
137 fStartRealTime = clock_type::now();
144 fEndRealTime = clock_type::now();
161 timeinfo = localtime(&rawtime);
162 return asctime(timeinfo);
169 std::stringstream ss;
181 ss << std::setprecision(1);
182 ss <<
" [Cpu=" << std::setprecision(1) << cpu_util <<
"%]";
187 ss <<
"Real=****s User=****s Sys=****s";
#define PTL_DEFAULT_OBJECT(NAME)
double GetUserElapsed() const
double GetRealElapsed() const
double GetSystemElapsed() const
static const char * GetClockTime()
std::ostream & operator<<(std::ostream &os, const Timer &t)