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);
36 unsigned int (*get_ticks) (void);
41 void init(bool st_ticks);
42 void start(unsigned int period);
45 /*======================================================================
46 return: NO = the timer is not started
49 ======================================================================*/
53 /*======================================================================
54 return: the time left (in millisecond)
55 note : the returned value can be negative
56 ======================================================================*/
60 void fwrite(FILE* fi);
64 #endif /*SUPERTUX_TIMER_H*/
66 /* Local Variables: */