20 #ifndef GEOS_COMMON_TIMER_HPP
21 #define GEOS_COMMON_TIMER_HPP
40 Timer( std::chrono::system_clock::duration & duration ):
41 m_start( std::chrono::system_clock::now() ),
42 m_duration( duration )
47 { m_duration += std::chrono::system_clock::now() - m_start; }
51 std::chrono::system_clock::time_point
const m_start;
53 std::chrono::system_clock::duration & m_duration;
Object that times the duration of its existence.
Timer(std::chrono::system_clock::duration &duration)
Constructor. The time the object is alive is added to duration.
~Timer()
Destructor. Adds to the referenced duration.