|
Template Numerical Library version\ main:d3a9f32
|
Performance counter for measuring CPU cycles. More...
#include <TNL/PerformanceCounters.h>
Public Member Functions | |
| PerformanceCounters () | |
| Constructor with no parameters. | |
| unsigned long long int | getCPUCycles () const |
| Returns the number of CPU cycles (machine cycles) elapsed on this timer. | |
| void | reset () |
| Reset counters. | |
| void | start () |
| Starts counters. | |
| void | stop () |
| Stops (pauses) the counters but do not set them to zeros. | |
| bool | writeLog (Logger &logger, int logLevel=0) const |
| Writes a record into the logger. | |
Performance counter for measuring CPU cycles.
The counter can be paused by calling stop and start methods and reset by calling reset.
|
nodiscard |
| void TNL::PerformanceCounters::start | ( | ) |
Starts counters.
This method can be used also after using the stop method. The counters then continue the measuring.
| bool TNL::PerformanceCounters::writeLog | ( | Logger & | logger, |
| int | logLevel = 0 ) const |
Writes a record into the logger.
| logger | Name of Logger object. |
| logLevel | A non-negative integer recording the log record indent. |