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

Used to benchmark MC generators. More...

#include <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
 Name of the object. More...
 
struct tms m_start
 Start. More...
 
struct tms m_stop
 Stop. More...
 
struct tms m_stored
 Stored. More...
 

Detailed Description

Used to benchmark MC generators.

Definition at line 38 of file Timer.h.

Constructor & Destructor Documentation

Timer ( const char *  name)
inline

Default constructor

Definition at line 41 of file Timer.h.

References reset().

Member Function Documentation

int elapsed_time ( )
inline

Get time elapsed since timer started

Definition at line 49 of file Timer.h.

References m_start, and m_stop.

void print ( )
inline

Print time elapsed

Definition at line 82 of file Timer.h.

References m_name, and m_stored.

void reset ( )
inline

Reset the clock

Definition at line 74 of file Timer.h.

References m_start, and m_stored.

void start ( )
inline

Start or restart the timer

Definition at line 44 of file Timer.h.

References m_start.

void stop ( )
inline

Save end time and aggregate build-in clock

Definition at line 60 of file Timer.h.

References m_start, m_stop, and m_stored.

int total_time ( )
inline

Get total time counted by the timer

Definition at line 55 of file Timer.h.

References m_stored.

Field Documentation

const char* m_name
private

Name of the object.

Definition at line 89 of file Timer.h.

struct tms m_start
private

Start.

Definition at line 90 of file Timer.h.

struct tms m_stop
private

Stop.

Definition at line 91 of file Timer.h.

struct tms m_stored
private

Stored.

Definition at line 92 of file Timer.h.


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