HepMC3 event record library
Public Member Functions | Private Attributes
Timer Class Reference

Detailed Description

Definition at line 29 of file Timer.h.

Public Member Functions

 Timer (const char *name)
 
void start ()
 
int elapsed_time ()
 
int total_time ()
 
void stop ()
 
void reset ()
 
void print ()
 

Private Attributes

const char * m_name
 
struct tms m_start m_stop m_stored
 

Constructor & Destructor Documentation

◆ Timer()

Timer ( const char *  name)
inline

Default constructor

Definition at line 32 of file Timer.h.

References reset().

Member Function Documentation

◆ elapsed_time()

int elapsed_time ( )
inline

Get time elapsed since timer started

Definition at line 40 of file Timer.h.

◆ print()

void print ( )
inline

Print time elapsed

Definition at line 73 of file Timer.h.

◆ reset()

void reset ( )
inline

Reset the clock

Definition at line 65 of file Timer.h.

◆ start()

void start ( )
inline

Start or restart the timer

Definition at line 35 of file Timer.h.

◆ stop()

void stop ( )
inline

Save end time and aggregate build-in clock

Definition at line 51 of file Timer.h.

◆ total_time()

int total_time ( )
inline

Get total time counted by the timer

Definition at line 46 of file Timer.h.


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