#include "PndIsoTimer.h" PndIsoTimer::PndIsoTimer() { fWatch = new TStopwatch(); } PndIsoTimer::~PndIsoTimer() { } void PndIsoTimer::Start() { fWatch->Start(true); } void PndIsoTimer::Stop() { fWatch->Stop(); } double PndIsoTimer::GetDiff() { return fWatch->RealTime(); } double PndIsoTimer::GetDiffMs() { return fWatch->RealTime() * 1000; } void PndIsoTimer::PrintDiff(std::string s) { std::cout << s << GetDiff() << " ms" << std::endl; } void PndIsoTimer::PrintDiffMs(std::string s) { std::cout << s << GetDiffMs() << " ms" << std::endl; } void PndIsoTimer::Print() { fWatch->Print("u"); // "u" for micro second precision, "m" for millisecond precision }