#include <Clock.h>
Definition at line 24 of file Clock.h.
◆ Clock()
Definition at line 27 of file Clock.h.
28 : m_time(0), m_freq(2.E7)
29 {}
◆ count() [1/2]
Definition at line 31 of file Clock.h.
32 {
34 return m_time;
35 }
◆ count() [2/2]
virtual ClockWord Clock::count |
( |
unsigned int |
c | ) |
|
|
inlinevirtual |
Definition at line 37 of file Clock.h.
38 {
39 m_time += c * 1./m_freq;
40 return m_time;
41 }
◆ cycles()
virtual unsigned int Clock::cycles |
( |
| ) |
|
|
inlinevirtual |
Definition at line 53 of file Clock.h.
54 {
55 return static_cast<unsigned>(ceil(m_time / m_freq));
56 }
◆ elapsed()
virtual double Clock::elapsed |
( |
| ) |
|
|
inlinevirtual |
Definition at line 58 of file Clock.h.
59 {
60 return m_time;
61 }
◆ freq()
double Clock::freq |
( |
| ) |
const |
|
inline |
Definition at line 48 of file Clock.h.
49 {
50 return m_freq;
51 }
◆ reset()
virtual void Clock::reset |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: