MASA-Core
Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
Timer Class Reference

Detailed Description

Definition at line 33 of file Timer.hpp.

#include <Timer.hpp>

List of all members.

Classes

struct  stat_t

Public Member Functions

 Timer ()
virtual ~Timer ()
void init ()
int createEvent (string name)
float eventRecord (int event)
float printStatistics (FILE *file=stdout)
float totalTime ()
bool intervalElapsed (float interval)

Static Public Member Functions

static float getGlobalTime ()

Static Private Member Functions

static float getElapsedTime (timeval *end_time, timeval *start_time)

Private Attributes

bool hasEvent
timeval previousEvent
timeval repeatedEvent
timeval intervalEvent
timeval startEvent
vector< stat_tstats

Static Private Attributes

static timeval staticEvent
static bool hasStaticEvent = false

Constructor & Destructor Documentation

Definition at line 59 of file Timer.cpp.

Timer::~Timer ( ) [virtual]

Definition at line 73 of file Timer.cpp.


Member Function Documentation

int Timer::createEvent ( string  name)

Definition at line 76 of file Timer.cpp.

float Timer::eventRecord ( int  event)

Definition at line 95 of file Timer.cpp.

float Timer::getElapsedTime ( timeval *  end_time,
timeval *  start_time 
) [static, private]

Definition at line 43 of file Timer.cpp.

float Timer::getGlobalTime ( ) [static]

Definition at line 29 of file Timer.cpp.

void Timer::init ( )

Definition at line 88 of file Timer.cpp.

bool Timer::intervalElapsed ( float  interval)

Definition at line 118 of file Timer.cpp.

float Timer::printStatistics ( FILE *  file = stdout)

Definition at line 133 of file Timer.cpp.

float Timer::totalTime ( )

Definition at line 111 of file Timer.cpp.


Member Data Documentation

bool Timer::hasEvent [private]

Definition at line 53 of file Timer.hpp.

bool Timer::hasStaticEvent = false [static, private]

Definition at line 59 of file Timer.hpp.

timeval Timer::intervalEvent [private]

Definition at line 56 of file Timer.hpp.

timeval Timer::previousEvent [private]

Definition at line 54 of file Timer.hpp.

timeval Timer::repeatedEvent [private]

Definition at line 55 of file Timer.hpp.

timeval Timer::startEvent [private]

Definition at line 57 of file Timer.hpp.

timeval Timer::staticEvent [static, private]

Definition at line 58 of file Timer.hpp.

vector<stat_t> Timer::stats [private]

Definition at line 61 of file Timer.hpp.


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