Inviwo 0.9.12-pre
Inviwo documentation
|
#include <clock.h>
Public Member Functions | |
ScopedClock (const std::string &logSource, const std::string &message, typename Clock::duration logIfAtLeast=typename Clock::duration{}, LogLevel logLevel=LogLevel::Info) | |
ScopedClock (const std::string &logSource, const std::string &message, double logIfAtLeastMilliSec, LogLevel logLevel=LogLevel::Info) | |
void | print () |
void | printAndReset () |
Public Member Functions inherited from inviwo::Clock | |
Clock () | |
bool | isRunning () const |
void | start () |
void | stop () |
void | reset () |
duration | getElapsedTime () const |
double | getElapsedMilliseconds () const |
double | getElapsedSeconds () const |
Additional Inherited Members | |
Public Types inherited from inviwo::Clock | |
using | clock = std::chrono::high_resolution_clock |
using | duration = std::chrono::high_resolution_clock::duration |
using | time_point = std::chrono::high_resolution_clock::time_point |
Protected Attributes inherited from inviwo::Clock | |
bool | isRunning_ = false |
time_point | startTime_ |
duration | accumulatedTime_ = static_cast<duration>(0) |
Scoped clock which prints the elapsed time when the instance is destroyed, i.e. print() is called by the destructor.
void inviwo::ScopedClock< Clock >::print | ( | ) |
log the accumulated time but only if it is larger than the duration threshold (logIfAtLeast) given in the constructor.
void inviwo::ScopedClock< Clock >::printAndReset | ( | ) |
log the accumulated time but only if it is larger than the duration threshold (logIfAtLeast) given in the constructor. Also resets the clock and restarts it.