cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench::clock::StopWatch Class Reference

Class of a stop watch. More...

#include <stat_bench/clock/stop_watch.h>

+ Collaboration diagram for stat_bench::clock::StopWatch:

Public Member Functions

 StopWatch ()=default
 Constructor.
 
 StopWatch (const StopWatch &)=delete
 
 StopWatch (StopWatch &&)=delete
 
 ~StopWatch ()=default
 Destructor.
 
auto calc_durations () const
 Calculate measured durations.
 
void lap ()
 Measure a time point for a lap.
 
auto operator= (const StopWatch &) -> StopWatch &=delete
 
auto operator= (StopWatch &&) -> StopWatch &=delete
 
void start (std::size_t num_laps)
 Start measurement.
 

Detailed Description

Class of a stop watch.

Definition at line 35 of file stop_watch.h.

Member Function Documentation

◆ calc_durations()

auto stat_bench::clock::StopWatch::calc_durations ( ) const
inlinenodiscard

Calculate measured durations.

Returns
Durations.

Definition at line 75 of file stop_watch.h.

◆ lap()

void stat_bench::clock::StopWatch::lap ( )
inline

Measure a time point for a lap.

Definition at line 68 of file stop_watch.h.

◆ start()

void stat_bench::clock::StopWatch::start ( std::size_t num_laps)
inline

Start measurement.

Note
This will reserve memory storage for laps.
Parameters
[in]num_lapsNumber of laps.

Definition at line 59 of file stop_watch.h.


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