iota.lib.cpp
IOTA C++ Library
Public Member Functions | Static Public Member Functions | List of all members
IOTA::Utils::StopWatch Class Reference

#include <stop_watch.hpp>

Public Member Functions

 StopWatch ()
 
void restart ()
 
void pause ()
 
void resume ()
 
std::chrono::milliseconds getElapsedTime () const
 

Static Public Member Functions

static std::chrono::milliseconds now ()
 

Detailed Description

Measures elapsed time.

Constructor & Destructor Documentation

◆ StopWatch()

IOTA::Utils::StopWatch::StopWatch ( )

StopWatch constructor: automatically starts the timer.

Member Function Documentation

◆ getElapsedTime()

std::chrono::milliseconds IOTA::Utils::StopWatch::getElapsedTime ( ) const
Returns
Elapsed time in milliseconds.

◆ now()

static std::chrono::milliseconds IOTA::Utils::StopWatch::now ( )
static
Returns
Current ts.

◆ pause()

void IOTA::Utils::StopWatch::pause ( )

Pause the timer.

◆ restart()

void IOTA::Utils::StopWatch::restart ( )

Restart timer.

◆ resume()

void IOTA::Utils::StopWatch::resume ( )

Resume the timer after pausing it.


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