Geophysical Inversion and Modelling Library  jenkins-pyGIMLi_release-295-SUCCESS-1-geb9a2204
GIMLI::Stopwatch Class Reference
+ Collaboration diagram for GIMLI::Stopwatch:

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 CycleCountercycleCounter () const

Protected Types

enum  watchstate { undefined, halted, running }

Protected Attributes

timeb starttime
timeb stoptime
enum GIMLI::Stopwatch::watchstate state_
CycleCounter cCounter_

Member Function Documentation

◆ cycles()

size_t GIMLI::Stopwatch::cycles ( bool  restart = false)

Returns the cpu cycles. Optional you can restart the stopwatch.

References restart().

◆ duration()

◆ reset()

void GIMLI::Stopwatch::reset ( )

Reset the stopwatch, same like restart.

References restart().

◆ restart()

void GIMLI::Stopwatch::restart ( )

Restart the stopwatch.

Referenced by cycles(), duration(), and reset().