8a0cf4042328842cebfd13f7bc908aec5bb6a595
[supertux.git] / src / timer.h
1 //
2 // C Interface: timer
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_TIMER_H
14 #define SUPERTUX_TIMER_H
15
16 /* Timer type */
17 typedef struct timer_type
18   {
19    unsigned int period;
20    unsigned int time;
21   }
22 timer_type;
23
24 void timer_init(timer_type* ptimer);
25 void timer_start(timer_type* ptimer, unsigned int period);
26 void timer_stop(timer_type* ptimer);
27 int timer_check(timer_type* ptimer);
28 int timer_started(timer_type* ptimer);
29 int timer_get_left(timer_type* ptimer);
30 int timer_get_gone(timer_type* ptimer);
31
32 #endif /*SUPERTUX_TIMER_H*/
33