Dragonfly  4.3
A text-based game engine
Clock.h
1 ///
2 /// The clock, for timing
3 ///
4 
5 #ifndef __CLOCK_H__
6 #define __CLOCK_H__
7 
8 namespace df {
9 
10 class 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.
17  Clock();
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__
long int split() const
Return time elapsed since delta() was called, -1 if error.
A 2-d bounding box.
Definition: Box.h:10
Clock()
Previous time delta() called (in microseconds).
long int delta()
Return time elapsed since delta() was called, -1 if error.
Definition: Clock.h:10