[SDL] Repeating timers

Donny Viszneki donny.viszneki at gmail.com
Fri Apr 10 12:03:02 PDT 2009


On Fri, Apr 10, 2009 at 3:01 PM, Donny Viszneki
<donny.viszneki at gmail.com> wrote:
> Here is the relevant code from SDL:

This code is the same in the SDL 1.2.13 release and SVN revision 4474

> if ( (int)(now - t->last_alarm) > (int)ms ) {
>    struct _SDL_TimerID timer;
>
>    if ( (now - t->last_alarm) < t->interval ) {
>        t->last_alarm += t->interval;
>    } else {
>        t->last_alarm = now;
>    }
>
> --
> http://codebad.com/
>



-- 
http://codebad.com/



More information about the SDL mailing list