HighMap library (C++)
Loading...
Searching...
No Matches
hmap::Recorder Struct Reference

The Recorder class is responsible for recording timing information for individual events. More...

#include <timer.hpp>

Collaboration diagram for hmap::Recorder:

Public Member Functions

 Recorder (std::string name)
 Constructs a new Recorder object.
 
void dump ()
 Outputs the timing data to the console.
 
void start ()
 Starts the timer for this Recorder instance.
 
void stop ()
 Stops the timer for this Recorder instance and updates the total elapsed time.
 

Public Attributes

std::string name
 The name of the event.
 
int nb_calls = 0
 The number of times the event has been recorded.
 
std::chrono::high_resolution_clock::time_point t0
 The start time of the event.
 
float total = 0.f
 The total time recorded for the event.
 

Detailed Description

The Recorder class is responsible for recording timing information for individual events.

Constructor & Destructor Documentation

◆ Recorder()

hmap::Recorder::Recorder ( std::string  name)

Constructs a new Recorder object.

Parameters
nameThe name of the event to be recorded.

Member Function Documentation

◆ dump()

void hmap::Recorder::dump ( )

Outputs the timing data to the console.

◆ start()

void hmap::Recorder::start ( )

Starts the timer for this Recorder instance.

◆ stop()

void hmap::Recorder::stop ( )

Stops the timer for this Recorder instance and updates the total elapsed time.

Member Data Documentation

◆ name

std::string hmap::Recorder::name

The name of the event.

◆ nb_calls

int hmap::Recorder::nb_calls = 0

The number of times the event has been recorded.

◆ t0

std::chrono::high_resolution_clock::time_point hmap::Recorder::t0

The start time of the event.

◆ total

float hmap::Recorder::total = 0.f

The total time recorded for the event.


The documentation for this struct was generated from the following files: