RUSH
Reusable Utilities in Single Headers is a collection of header-only utilities for C++
Loading...
Searching...
No Matches
rush::chrono::Chronometer< T > Class Template Reference

A chrono class that automatically prints elapsed time. More...

#include <chrono.hpp>

Inheritance diagram for rush::chrono::Chronometer< T >:
rush::chrono::Chrono< s >

Public Member Functions

 Chronometer (std::string name="")
 Constructor.
 
 Chronometer (const Chronometer &)=delete
 
 Chronometer (Chronometer &&) noexcept=delete
 
Chronometeroperator= (const Chronometer &)=delete
 
Chronometeroperator= (Chronometer &&other) noexcept=delete
 
- Public Member Functions inherited from rush::chrono::Chrono< s >
 Chrono (const Chrono &)=delete
 
 Chrono (Chrono &&) noexcept=delete
 
Chronooperator= (const Chrono &)=delete
 
Chronooperator= (Chrono &&other) noexcept=delete
 
void tic ()
 Reset the chrono timer.
 
double toc () const
 Get elapsed time since last tic.
 
std::string unit () const
 Get unit as string.
 

Detailed Description

template<typename T = s>
class rush::chrono::Chronometer< T >

A chrono class that automatically prints elapsed time.

Template Parameters
TUnit of time (default to seconds).

Constructor & Destructor Documentation

◆ Chronometer()

template<typename T = s>
rush::chrono::Chronometer< T >::Chronometer ( std::string name = "")
inlineexplicit

Constructor.

Parameters
nameOptional name to be printed along with elapsed time.

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