Geophysical Inversion and Modelling Library
v1.5.2-5-g042d7f36
|
Public Member Functions | |
Stopwatch (bool start=true) | |
void | start () |
void | stop (bool verbose=false) |
void | restart () |
void | reset () |
double | duration (bool restart=false) |
size_t | cycles (bool restart=false) |
const CycleCounter & | cycleCounter () const |
void | store (bool restart=false) |
const RVector & | stored () const |
Protected Types | |
enum | watchstate { undefined , halted , running } |
Protected Attributes | |
enum GIMLI::Stopwatch::watchstate | _state |
std::chrono::time_point< std::chrono::high_resolution_clock > | _start |
std::chrono::time_point< std::chrono::high_resolution_clock > | _stop |
RVector * | _store |
CycleCounter | _cCounter |
size_t GIMLI::Stopwatch::cycles | ( | bool | restart = false | ) |
Returns the cpu cycles. Optional you can restart the stopwatch.
double GIMLI::Stopwatch::duration | ( | bool | restart = false | ) |
Returns the current duration in seconds. Optional you can restart the stopwatch.
Referenced by GIMLI::RInversion::checkJacobian(), GIMLI::DCSRMultiElectrodeModelling::checkPrimpotentials_(), GIMLI::ModellingBase::createJacobian(), GIMLI::ModellingBase::createJacobian_mt(), GIMLI::MemWatch::info(), and GIMLI::ModellingBase::setMesh().
void GIMLI::Stopwatch::reset | ( | ) |
Reset the stopwatch, and delete stored values.
void GIMLI::Stopwatch::restart | ( | ) |
Restart the stopwatch.
void GIMLI::Stopwatch::store | ( | bool | restart = false | ) |
Save current duration value into store. Reset current time if needed to store relative times.
|
inline |
Get stored duration values.