![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
#include <inviwo/core/util/clock.h>
Public Types | |
| using | Duration = Clock::duration |
| 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 |
Public Member Functions | |
| ScopedClock & | operator= (const ScopedClock &)=delete |
| ScopedClock & | operator= (ScopedClock &&)=delete |
| void | print () const |
| void | printAndReset () |
| ScopedClock (Callback message, Duration logIfAtLeast={}, LogLevel logLevel=LogLevel::Info, SourceContext context=std::source_location::current()) | |
| ScopedClock (const ScopedClock &)=delete | |
| ScopedClock (ScopedClock &&)=delete | |
| Public Member Functions inherited from inviwo::Clock | |
| Clock () | |
| double | getElapsedMilliseconds () const |
| double | getElapsedSeconds () const |
| duration | getElapsedTime () const |
| bool | isRunning () const |
| void | reset () |
| void | start () |
| void | stop () |
Additional Inherited Members | |
| Protected Attributes inherited from inviwo::Clock | |
| duration | accumulatedTime_ = static_cast<duration>(0) |
| bool | isRunning_ = false |
| time_point | startTime_ |
Scoped clock which prints the elapsed time when the instance is destroyed, i.e. print() is called by the destructor.
| void inviwo::ScopedClock< Clock, Callback >::print | ( | ) | const |
log the accumulated time but only if it is larger than the duration threshold (logIfAtLeast) given in the constructor.
| void inviwo::ScopedClock< Clock, Callback >::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.