[SDL] Higher precision SDL_GetTicks()?

John Magnotti john.magnotti at gmail.com
Tue Feb 7 15:08:38 PST 2012


I would also suggest turning off the automatic graphics switching if
you're running experiments on your laptop. I didn't benchmark
extensively, but anecdotally things worked better with that off (i.e.,
forcing graphics card use), even for the small amount of texturing I
was doing, especially when the laptop is driving a projector.

hope that helps!

John

On Tue, Feb 7, 2012 at 4:14 PM, Patrick Baggett
<baggett.patrick at gmail.com> wrote:
> Well, Wiki probably isn't the best source for this, but:
>
> http://en.wikipedia.org/wiki/Time_Stamp_Counter
>
> In particular, (since it looks like MacOS implies Intel CPUs about 99% of
> the time)
>
> For Pentium 4 processors, Intel Xeon processors (family [0FH], models [03H
> and higher]); for Intel Core Solo and Intel Core Duo processors (family
> [06H], model [0EH]); for the Intel Xeon processor 5100 series and Intel Core
> 2 Duo processors (family [06H], model [0FH]); for Intel Core 2 and Intel
> Xeon processors (family [06H], display_model [17H]); for Intel Atom
> processors (family [06H], display_model [1CH]): the time-stamp counter
> increments at a constant rate. That rate may be set by the maximum
> core-clock to bus-clock ratio of the processor or may be set by the maximum
> resolved frequency at which the processor is booted. The maximum resolved
> frequency may differ from the maximum qualified frequency of the processor.
>
> This is probably true of Intel i3/5/7 as well, so you should be reasonably
> safe.
>
> If you look at http://hg.libsdl.org/SDL/rev/6bd701987ba9 on line 5.25, you
> can see that these are implemented in a reasonable way for UNIX-like OSes,
> so you should be able to use the above-mentioned SDL functions portably.
> Unless you're running on older AMD CPUs (K8, not K10), then I wouldn't worry
> too much. I don't think you'll need to mess with the power management unless
> you're running on an older machine.
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list