4 // Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 #ifndef SUPERTUX_TIMER_H
22 #define SUPERTUX_TIMER_H
24 extern unsigned int st_pause_ticks, st_pause_count;
26 unsigned int st_get_ticks(void);
27 void st_pause_ticks_init(void);
28 void st_pause_ticks_start(void);
29 void st_pause_ticks_stop(void);
30 bool st_pause_ticks_started(void);
37 unsigned int (*get_ticks) (void);
42 void init(bool st_ticks);
43 void start(unsigned int period);
46 /*======================================================================
47 return: NO = the timer is not started
50 ======================================================================*/
54 /*======================================================================
55 return: the time left (in millisecond)
56 note : the returned value can be negative
57 ======================================================================*/
61 void fwrite(FILE* fi);
65 #endif /*SUPERTUX_TIMER_H*/
67 /* Local Variables: */