|
| std::chrono::high_resolution_clock::time_point | startPoint |
| std::chrono::high_resolution_clock::time_point | endPoint |
| int | stopped |
Definition at line 21 of file Timer.h.
◆ Timer()
Definition at line 20 of file Timer.cpp.
21{
22 startPoint = std::chrono::high_resolution_clock::now();
23 endPoint = startPoint;
24 stopped = 0;
25}
◆ ~Timer()
◆ getElapsedTime()
| double Timer::getElapsedTime |
( |
| ) |
|
Definition at line 110 of file Timer.cpp.
111{
112 return this->getElapsedTimeInSec();
113}
◆ getElapsedTimeInMicroSec()
| double Timer::getElapsedTimeInMicroSec |
( |
| ) |
|
Definition at line 80 of file Timer.cpp.
81{
82 return this->getElapsedTimeInNanoSec() * 0.001;
83}
◆ getElapsedTimeInMilliSec()
| double Timer::getElapsedTimeInMilliSec |
( |
| ) |
|
Definition at line 90 of file Timer.cpp.
91{
92 return this->getElapsedTimeInNanoSec() * 0.000001;
93}
◆ getElapsedTimeInNanoSec()
| double Timer::getElapsedTimeInNanoSec |
( |
| ) |
|
Definition at line 66 of file Timer.cpp.
67{
68 if (!stopped)
69 endPoint = std::chrono::high_resolution_clock::now();
70
71
72 return std::chrono::duration<double, std::nano>{endPoint - startPoint}.count();
73}
◆ getElapsedTimeInSec()
| double Timer::getElapsedTimeInSec |
( |
| ) |
|
Definition at line 100 of file Timer.cpp.
101{
102 return this->getElapsedTimeInNanoSec() * 0.000000001;
103}
◆ start()
Definition at line 42 of file Timer.cpp.
43{
44 stopped = 0;
45 startPoint = std::chrono::high_resolution_clock::now();
46}
◆ stop()
Definition at line 54 of file Timer.cpp.
55{
56 stopped = 1;
57 endPoint = std::chrono::high_resolution_clock::now();
58}
◆ endPoint
| std::chrono::high_resolution_clock::time_point Timer::endPoint |
|
private |
◆ startPoint
| std::chrono::high_resolution_clock::time_point Timer::startPoint |
|
private |
◆ stopped
The documentation for this class was generated from the following files: