Monero
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Stopwatch Class Reference

#include <stopwatch.hpp>

Public Member Functions

 Stopwatch (bool startNow=false)
 
void reset ()
 
void start ()
 
void restart ()
 
void stop ()
 
double getElapsed () const
 

Private Types

using chrono_t = std::chrono::high_resolution_clock::time_point
 
using sw_unit = std::chrono::nanoseconds
 

Private Member Functions

uint64_t getElapsedNanosec () const
 

Private Attributes

chrono_t startMark
 
uint64_t elapsed
 
bool isRunning
 

Member Typedef Documentation

◆ chrono_t

using Stopwatch::chrono_t = std::chrono::high_resolution_clock::time_point
private

◆ sw_unit

using Stopwatch::sw_unit = std::chrono::nanoseconds
private

Constructor & Destructor Documentation

◆ Stopwatch()

Stopwatch::Stopwatch ( bool  startNow = false)
inline

Member Function Documentation

◆ getElapsed()

double Stopwatch::getElapsed ( ) const
inline

◆ getElapsedNanosec()

uint64_t Stopwatch::getElapsedNanosec ( ) const
inlineprivate

◆ reset()

void Stopwatch::reset ( )
inline

◆ restart()

void Stopwatch::restart ( )
inline

◆ start()

void Stopwatch::start ( )
inline

◆ stop()

void Stopwatch::stop ( )
inline

Member Data Documentation

◆ elapsed

uint64_t Stopwatch::elapsed
private

◆ isRunning

bool Stopwatch::isRunning
private

◆ startMark

chrono_t Stopwatch::startMark
private

The documentation for this class was generated from the following file: