Dragonfly 4.20
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

◆ Clock()

df::Clock::Clock ( )

Previous time delta() called (in microseconds).

Sets previous_time to current time.

Member Function Documentation

◆ delta()

long int df::Clock::delta ( )

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

Resets clock time. Units are microseconds.

◆ split()

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

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

Does not reset clock time. Units are microseconds.