OFELI's Logo

An Object Oriented Finite Element Library

To handle elapsed time counting. More...

#include <Timer.h>

Public Member Functions

 Timer ()
 Default constructor.
 
 ~Timer ()
 Destructor.
 
bool Started () const
 Say if time counter has started. More...
 
void Start ()
 Start (or resume) time counting. More...
 
void Stop ()
 Stop time counting. More...
 
void Clear ()
 Clear time value (Set to zero)
 
real_t get () const
 Return elapsed time (in seconds)
 
real_t getTime () const
 Return elapsed time (in seconds) More...
 

Detailed Description

To handle elapsed time counting.

This class is to be used when testing program performances. A normal usage of the class is, once an instance is constructed, to use alternatively, Start, Stop and Resume. Elapsed time can be obtained once the member function Stop is called.

Author
Rachid Touzani

Member Function Documentation

◆ getTime()

real_t getTime ( ) const

Return elapsed time (in seconds)

Identical to get

◆ Start()

void Start ( )

Start (or resume) time counting.

This member function is to be used to start or resume time counting

◆ Started()

bool Started ( ) const

Say if time counter has started.

Return true if time has started, false if not

◆ Stop()

void Stop ( )

Stop time counting.

This function interrupts time counting. This one can be resumed by the function Start






Copyright © 1998-2022 Rachid Touzani