#include <cycletimer.h>
Definition at line 19 of file cycletimer.h.
◆ CycleTimer()
CycleTimer::CycleTimer |
( |
| ) |
|
|
inline |
◆ GetInMs()
int64_t CycleTimer::GetInMs |
( |
| ) |
const |
|
inline |
Definition at line 54 of file cycletimer.h.
54 {
55 return running_ ? now() - start_ + sum_ : sum_;
56 }
◆ Reset()
void CycleTimer::Reset |
( |
| ) |
|
|
inline |
Definition at line 31 of file cycletimer.h.
31 {
32 running_ = false;
33 sum_ = 0;
34 start_ = 0;
35 }
◆ Restart()
void CycleTimer::Restart |
( |
| ) |
|
|
inline |
◆ Start()
void CycleTimer::Start |
( |
| ) |
|
|
inline |
Definition at line 38 of file cycletimer.h.
38 {
39 running_ = true;
40 start_ = now();
41 }
◆ Stop()
void CycleTimer::Stop |
( |
| ) |
|
|
inline |
Definition at line 48 of file cycletimer.h.
48 {
49 if (running_) {
50 sum_ += now() - start_;
51 running_ = false;
52 }
53 }
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/unittest/cycletimer.h