KatanaNativeInterface $VERSION$

KNI::Timer Class Reference

Provides a stop-watch-like class with a resolution of milliseconds. More...

#include <Timer.h>

List of all members.

Public Member Functions

 Timer ()
 Timer (long timeout)
void Set (long timeout)
void Start ()
void Set_And_Start (long timeout)
bool Elapsed () const
 Returns true if timer is elapsed.
long ElapsedTime () const
 Returns the elapsed time.
void WaitUntilElapsed () const
 Block until time's up.

Private Member Functions

long _ElapsedTime () const
 Platform specific implementation of ElapsedTime().

Private Attributes

long _timeout
struct timeval _ct

Detailed Description

Provides a stop-watch-like class with a resolution of milliseconds.

Definition at line 41 of file Timer.h.


Constructor & Destructor Documentation

KNI::Timer::Timer ( )
KNI::Timer::Timer ( long  timeout)

Member Function Documentation

long KNI::Timer::_ElapsedTime ( ) const [private]

Platform specific implementation of ElapsedTime().

bool KNI::Timer::Elapsed ( ) const

Returns true if timer is elapsed.

long KNI::Timer::ElapsedTime ( ) const

Returns the elapsed time.

void KNI::Timer::Set ( long  timeout)
void KNI::Timer::Set_And_Start ( long  timeout)
void KNI::Timer::Start ( )
void KNI::Timer::WaitUntilElapsed ( ) const

Block until time's up.


Member Data Documentation

struct timeval KNI::Timer::_ct [private]

Definition at line 48 of file Timer.h.

long KNI::Timer::_timeout [private]

Definition at line 43 of file Timer.h.


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