Dragonfly 4.20
A text-based game engine
Clock.h
1///
2/// The clock, for timing
3///
4
5#ifndef __CLOCK_H__
6#define __CLOCK_H__
7
8namespace df {
9
10class Clock {
11
12 private:
13 long int m_previous_time; /// Previous time delta() called (in microseconds).
14
15 public:
16 /// Sets previous_time to current time.
18
19 /// Return time elapsed since delta() was called, -1 if error.
20 /// Resets clock time.
21 /// Units are microseconds.
22 long int delta();
23
24 /// Return time elapsed since delta() was called, -1 if error.
25 /// Does not reset clock time.
26 /// Units are microseconds.
27 long int split() const;
28};
29
30} // end of namespace df
31#endif // __CLOCK_H__
Definition: Clock.h:10
long int delta()
Return time elapsed since delta() was called, -1 if error.
Clock()
Previous time delta() called (in microseconds).
long int split() const
Return time elapsed since delta() was called, -1 if error.
An animation for a sprite.
Definition: Animation.h:15