Debian Codegraph @

include/timer.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2002-2010 The DOSBox Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef DOSBOX_TIMER_H
20 #define DOSBOX_TIMER_H
21
22 /* underlying clock rate in HZ */
23 #include <SDL.h>
24
25 #define PIT_TICK_RATE 1193182
26
27 #define GetTicks() SDL_GetTicks()
28
29 typedef void (*TIMER_TickHandler)(void);
30
31 /* Register a function that gets called everytime if 1 or more ticks pass */
32 void TIMER_AddTickHandler(TIMER_TickHandler handler);
33 void TIMER_DelTickHandler(TIMER_TickHandler handler);
34
35 /* This will add 1 milliscond to all timers */
36 void TIMER_AddTick(void);
37
38 #endif