Ensign
Low-rank framework for multi-core CPUs and GPUs
Loading...
Searching...
No Matches
Ensign::timer Struct Reference

This timer class measures the elapsed time between two events. More...

#include <timer.hpp>

Public Member Functions

 timer ()
 
void reset ()
 
void start ()
 
double stop ()
 
double total ()
 
double average ()
 
double deviation ()
 
unsigned count ()
 

Public Attributes

timespec t_start
 
bool running
 
double elapsed
 
unsigned counter
 
double elapsed_sq
 

Detailed Description

This timer class measures the elapsed time between two events.

Timers can be started and stopped repeatedly. The total time as well as the average time between two events can be queried using the total() and average() methods, respectively.

Definition at line 20 of file timer.hpp.

Constructor & Destructor Documentation

◆ timer()

Ensign::timer::timer ( )

Member Function Documentation

◆ average()

double Ensign::timer::average ( )

◆ count()

unsigned Ensign::timer::count ( )

◆ deviation()

double Ensign::timer::deviation ( )

◆ reset()

void Ensign::timer::reset ( )

◆ start()

void Ensign::timer::start ( )

◆ stop()

double Ensign::timer::stop ( )

◆ total()

double Ensign::timer::total ( )

Member Data Documentation

◆ counter

unsigned Ensign::timer::counter

Definition at line 24 of file timer.hpp.

◆ elapsed

double Ensign::timer::elapsed

Definition at line 23 of file timer.hpp.

◆ elapsed_sq

double Ensign::timer::elapsed_sq

Definition at line 25 of file timer.hpp.

◆ running

bool Ensign::timer::running

Definition at line 22 of file timer.hpp.

◆ t_start

timespec Ensign::timer::t_start

Definition at line 21 of file timer.hpp.


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