28template <
typename TimeT = std::chrono::milliseconds,
typename ClockT =
29#if defined(_MSC_VER) && _MSC_VER == 1800
30 std::chrono::system_clock
32 std::chrono::steady_clock
40 for (
int i = 0; i < 1000; i++) {
41 myEnd = ClockT::now();
53 myEnd = ClockT::now();
60 return (
long long int)delta.count();
76 return (
long long int)(std::accumulate(
myHistory.begin(),
myHistory.end(), TimeT{})).count();
81 std::chrono::time_point<ClockT>
myEnd;
StopWatch(const bool calibrate=false)
long long int getTotal() const
long long int getAverage() const
std::chrono::time_point< ClockT > myStart
std::vector< TimeT > myHistory
long long int elapsed() const
void add(const StopWatch< TimeT, ClockT > &other)
std::chrono::time_point< ClockT > myEnd
const std::vector< TimeT > & getHistory() const