[SDL] Repeating timers
grimfang4 at gmail.com
Fri Apr 10 12:24:46 PDT 2009
I agree... I think SDL should use the available precision that is
closest to 1ms on the systems that support such. This is one of the
loudest complaints I hear of SDL.
On Fri, Apr 10, 2009 at 3:19 PM, Mason Wheeler <masonwheeler at yahoo.com> wrote:
>>----- Original Message ----
>>From: Donny Viszneki <donny.viszneki at gmail.com>
>>Subject: Re: [SDL] Repeating timers
>>That is absolute craziness.
>>SDL timers are not good for much because their resolution is too low.
>>You clearly need very precise timing (which is typical of games) and
>>you should not be using an SDL timer for this.
> Which begs the question: why do SDL timers suck so badly? The
> rest of the library is a very nice, high-quality package, but it sticks
> us with a timer that's completely unsuitable for real-world game
> This may not work quite as well on embedded systems, but
> modern desktops and laptops, at least, run CPUs measured in
> gigahertz. If you have 1 GHz of processing power, you get 1M
> CPU cycles per millisecond. I believe I heard somewhere that
> a context switch generally costs ~2000 cycles. If so, why
> shouldn't we be able to have a timer with a resolution of 1 ms,
> on desktop OSes at least?
> SDL mailing list
> SDL at lists.libsdl.org
More information about the SDL