This commit was manufactured by cvs2svn to create tag 'd2x-0_1_2'.
[btb/d2x.git] / arch / sdl / timer.c
1 /*
2  * $Source: /cvs/cvsroot/d2x/arch/sdl/timer.c,v $
3  * $Revision: 1.3 $
4  * $Author: bradleyb $
5  * $Date: 2001-10-19 09:45:02 $
6  *
7  * SDL library timer functions
8  *
9  * $Log: not supported by cvs2svn $
10  * Revision 1.2  2001/01/29 13:35:09  bradleyb
11  * Fixed build system, minor fixes
12  *
13  */
14
15 #ifdef HAVE_CONFIG_H
16 #include <conf.h>
17 #endif
18
19 #include <SDL/SDL.h>
20 #include "maths.h"
21
22 fix timer_get_fixed_seconds(void) {
23   fix x;
24   unsigned long tv_now = SDL_GetTicks();
25   x=i2f(tv_now/1000) | fixdiv(i2f(tv_now % 1000),i2f(1000));
26   return x;
27 }