Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

eqn_cruncher::timer Class Reference

This is a thin wrapper around the UNIX timer API. More...

#include <timer.hpp>

List of all members.

Public Methods

 timer ()
 Default constructs the timer object.

void clear ()
 Clears the memory belonging to tms_begin & tms_end and sets elapsed_begin and elapsed_end to 0.

void start ()
 Starts the timer.

void stop ()
 Stops the timer.

size_t real_time () const
 Computes the real time used. This is typically the sum of the user and system times.

size_t user_time () const
 Computes the user time used. This is the time that the program spends in the user space, executing user space code.

size_t system_time () const
 Computes the system time used. This is the time that the program spends in the kernel space, executing kernel space code.


Detailed Description

This is a thin wrapper around the UNIX timer API.


Constructor & Destructor Documentation

eqn_cruncher::timer::timer   [inline]
 

Default constructs the timer object.


Member Function Documentation

void eqn_cruncher::timer::clear   [inline]
 

Clears the memory belonging to tms_begin & tms_end and sets elapsed_begin and elapsed_end to 0.

size_t eqn_cruncher::timer::real_time   const [inline]
 

Computes the real time used. This is typically the sum of the user and system times.

Returns:
The real time.

void eqn_cruncher::timer::start   [inline]
 

Starts the timer.

void eqn_cruncher::timer::stop   [inline]
 

Stops the timer.

size_t eqn_cruncher::timer::system_time   const [inline]
 

Computes the system time used. This is the time that the program spends in the kernel space, executing kernel space code.

Returns:
The system time.

size_t eqn_cruncher::timer::user_time   const [inline]
 

Computes the user time used. This is the time that the program spends in the user space, executing user space code.

Returns:
The user time.


The documentation for this class was generated from the following file:
Generated on Mon Oct 11 13:09:26 2004 for Equation Cruncher by doxygen1.2.18