goat3dgfx

view src/timer.h @ 21:7c593721547f

integrated support for the multiple animation system of libanim
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Dec 2013 11:59:32 +0200
parents 1873dfd13f2d
children
line source
1 #ifndef TIMER_H_
2 #define TIMER_H_
4 namespace goatgfx {
6 unsigned long get_time_msec(void);
7 void sleep_msec(unsigned long msec);
9 double get_time_sec(void);
10 void sleep_sec(double sec);
13 class Timer {
14 private:
15 unsigned long start_time, pause_time;
17 public:
18 Timer();
20 void reset();
22 void start();
23 void stop();
25 bool is_running() const;
27 unsigned long get_msec() const;
28 double get_sec() const;
29 };
31 } // namespace goatgfx
32 #endif // TIMER_H_