KatanaNativeInterface  $VERSION$
Public Member Functions | Private Member Functions | Private Attributes | List of all members
KNI::Timer Class Reference

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

#include <Timer.h>

Collaboration diagram for KNI::Timer:
Collaboration graph

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. More...
 
long ElapsedTime () const
 Returns the elapsed time. More...
 
void WaitUntilElapsed () const
 Block until time's up. More...
 

Private Member Functions

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

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

◆ Timer() [1/2]

KNI::Timer::Timer ( )

◆ Timer() [2/2]

KNI::Timer::Timer ( long  timeout)

Member Function Documentation

◆ _ElapsedTime()

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

Platform specific implementation of ElapsedTime().

◆ Elapsed()

bool KNI::Timer::Elapsed ( ) const

Returns true if timer is elapsed.

◆ ElapsedTime()

long KNI::Timer::ElapsedTime ( ) const

Returns the elapsed time.

◆ Set()

void KNI::Timer::Set ( long  timeout)

◆ Set_And_Start()

void KNI::Timer::Set_And_Start ( long  timeout)

◆ Start()

void KNI::Timer::Start ( )

◆ WaitUntilElapsed()

void KNI::Timer::WaitUntilElapsed ( ) const

Block until time's up.

Member Data Documentation

◆ _ct

struct timeval KNI::Timer::_ct
private

Definition at line 48 of file Timer.h.

◆ _timeout

long KNI::Timer::_timeout
private

Definition at line 43 of file Timer.h.


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