1 /* $Id: timer.c,v 1.6 2003-02-21 04:08:48 btb Exp $ */
4 * SDL library timer functions
18 fix timer_get_approx_seconds(void)
20 return approx_msec_to_fsec(SDL_GetTicks());
23 fix timer_get_fixed_seconds(void)
26 unsigned long tv_now = SDL_GetTicks();
27 x=i2f(tv_now/1000) | fixdiv(i2f(tv_now % 1000),i2f(1000));
31 void timer_delay(fix seconds)
33 SDL_Delay(f2i(fixmul(seconds, i2f(1000))));