Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::Clock Class Reference

Public Member Functions

 Clock ()
 
long int delta ()
 
long int split () const
 

Private Attributes

long int m_previous_time
 

Constructor & Destructor Documentation

df::Clock::Clock ( )

Previous time delta() called (in microseconds).

Sets previous_time to current time.

Member Function Documentation

long int df::Clock::delta ( )

Return time elapsed since delta() was called, -1 if error.

Resets clock time. Units are microseconds.

long int df::Clock::split ( ) const

Return time elapsed since delta() was called, -1 if error.

Does not reset clock time. Units are microseconds.