Verovio
Source code documentation
runtimeclock.h
1 // Name: runtimeclock.h
3 // Author: David Bauer
4 // Created: 06/08/2021
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_RUNTIMECLOCK_H__
9 #define __VRV_RUNTIMECLOCK_H__
10 
11 #ifndef NO_RUNTIME
12 
13 #include <chrono>
14 
15 //----------------------------------------------------------------------------
16 
17 namespace vrv {
18 
19 //----------------------------------------------------------------------------
20 // RuntimeClock
21 //----------------------------------------------------------------------------
22 
26 class RuntimeClock {
27 public:
31  RuntimeClock();
34 
36  void Reset();
37 
39  double GetSeconds() const;
40 
41 private:
42  //
43 public:
44  //
45 private:
47  std::chrono::time_point<std::chrono::steady_clock> m_start;
48 
49 }; // class RuntimeClock
50 
51 } // namespace vrv
52 
53 #endif // NO_RUNTIME
54 #endif // __VRV_RUNTIMECLOCK_H__
vrv::RuntimeClock
This class represents a clock to measure runtime.
Definition: runtimeclock.h:26
vrv::RuntimeClock::Reset
void Reset()
Resets the clock.
vrv::RuntimeClock::GetSeconds
double GetSeconds() const
Get current runtime in seconds.