VR-Link API Documentation for DIS
List of all members | Public Member Functions | Protected Types | Protected Attributes
DtTimedSection Class Reference

DtTimedSection are objects used to measure a section of time. More...

+ Collaboration diagram for DtTimedSection:

Public Member Functions

 DtTimedSection ()
 CTOR.
void start ()
 Start timing.
void stop ()
 Stop timing.
double duration () const
 Get the amount of time between starts and stops.

Protected Types

typedef timeval TimeValue

Protected Attributes

struct timezone tz
TimeValue myStartVal
TimeValue myEndVal

Detailed Description

DtTimedSection are objects used to measure a section of time.

The time measured is between the start call and the stop call. Timed sections may be created on either the stack or the heap. Construction cost should be near trivial, so caching is not necessary.

Examples

Member Typedef Documentation

typedef timeval DtTimedSection::TimeValue
protected

Constructor & Destructor Documentation

DtTimedSection::DtTimedSection ( )

CTOR.

Member Function Documentation

double DtTimedSection::duration ( ) const

Get the amount of time between starts and stops.

This function should only be called once per 'measurement' as the duration calculation may take non trivial time.

Warning
This function should only be called after a start/stop pair.
Return values
Thereturn value is the time in seconds.
void DtTimedSection::start ( )

Start timing.

void DtTimedSection::stop ( )

Stop timing.

Member Data Documentation

TimeValue DtTimedSection::myEndVal
protected
TimeValue DtTimedSection::myStartVal
protected
struct timezone DtTimedSection::tz
protected

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)