carl  24.04
Computer ARithmetic Library
carl::Timer Class Reference

This classes provides an easy way to obtain the current number of milliseconds that the program has been running. More...

#include <Timer.h>

Public Member Functions

 Timer () noexcept
 
std::size_t passed () const noexcept
 Calculated the number of milliseconds since this object has been created. More...
 
void reset () noexcept
 Reset the start point to now. More...
 

Private Types

using clock = std::chrono::high_resolution_clock
 The clock type used jere. More...
 
using duration = std::chrono::duration< std::size_t, std::milli >
 The duration type used here. More...
 

Private Attributes

clock::time_point mStart
 Start of this timer. More...
 

Detailed Description

This classes provides an easy way to obtain the current number of milliseconds that the program has been running.

Definition at line 18 of file Timer.h.

Member Typedef Documentation

◆ clock

using carl::Timer::clock = std::chrono::high_resolution_clock
private

The clock type used jere.

Definition at line 20 of file Timer.h.

◆ duration

using carl::Timer::duration = std::chrono::duration<std::size_t,std::milli>
private

The duration type used here.

Definition at line 22 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer()

carl::Timer::Timer ( )
inlinenoexcept

Definition at line 26 of file Timer.h.

Member Function Documentation

◆ passed()

std::size_t carl::Timer::passed ( ) const
inlinenoexcept

Calculated the number of milliseconds since this object has been created.

Returns
Milliseconds passed.

Definition at line 32 of file Timer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void carl::Timer::reset ( )
inlinenoexcept

Reset the start point to now.

Definition at line 40 of file Timer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ mStart

clock::time_point carl::Timer::mStart
private

Start of this timer.

Definition at line 24 of file Timer.h.


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