goat3dgfx

annotate src/timer.h @ 4:ae47239c8c0d

merged changes from windows
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 16 Nov 2013 21:09:42 +0200
parents
children 7d6b667821cf
rev   line source
nuclear@0 1 #ifndef TIMER_H_
nuclear@0 2 #define TIMER_H_
nuclear@0 3
nuclear@0 4 unsigned long get_time_msec(void);
nuclear@0 5 void sleep_msec(unsigned long msec);
nuclear@0 6
nuclear@0 7 double get_time_sec(void);
nuclear@0 8 void sleep_sec(double sec);
nuclear@0 9
nuclear@0 10
nuclear@0 11 class Timer {
nuclear@0 12 private:
nuclear@0 13 unsigned long start_time, pause_time;
nuclear@0 14
nuclear@0 15 public:
nuclear@0 16 Timer();
nuclear@0 17
nuclear@0 18 void reset();
nuclear@0 19
nuclear@0 20 void start();
nuclear@0 21 void stop();
nuclear@0 22
nuclear@0 23 bool is_running() const;
nuclear@0 24
nuclear@0 25 unsigned long get_msec() const;
nuclear@0 26 double get_sec() const;
nuclear@0 27 };
nuclear@0 28
nuclear@0 29 #endif // TIMER_H_