9 #include "spineMLLogging.h" 19 Timer(
const std::string &title) : m_Start(
std::chrono::high_resolution_clock::now()), m_Title(title)
25 LOGI_SPINEML << m_Title <<
get() << std::endl;
33 auto now = std::chrono::high_resolution_clock::now();
34 std::chrono::duration<double, std::milli> duration = now - m_Start;
35 return duration.count();
42 std::chrono::time_point<std::chrono::high_resolution_clock> m_Start;
52 TimerAccumulate(
double &accumulator) : m_Start(
std::chrono::high_resolution_clock::now()), m_Accumulator(accumulator)
58 m_Accumulator +=
get();
66 auto now = std::chrono::high_resolution_clock::now();
67 std::chrono::duration<double, std::milli> duration = now - m_Start;
68 return duration.count();
75 std::chrono::time_point<std::chrono::high_resolution_clock> m_Start;
76 double &m_Accumulator;
Definition: include/spineml/simulator/timer.h:16
TimerAccumulate(double &accumulator)
Definition: include/spineml/simulator/timer.h:52
Definition: include/spineml/simulator/timer.h:49
Definition: connectors.h:25
~TimerAccumulate()
Definition: include/spineml/simulator/timer.h:56
Timer(const std::string &title)
Definition: include/spineml/simulator/timer.h:19
~Timer()
Definition: include/spineml/simulator/timer.h:23