[SDL] very precise control of display timing

Pallier Christophe pallier at lscp.ehess.fr
Fri Aug 24 01:43:00 PDT 2001


Hello,

Many thanks to David Olofson for the detailed answer and the links provided!

If I may add one question: From my readings about the TSC, I understood
it was counting cycles. I intend to run my soft on laptops, some of which feature
"mobile pentiums" that, if I understand correctly, can adjust their internal
frequency depending on the current load of the processor...(I don't know if this
is automatic or if this is under control of APM functions, but anyway,
I cannot count on users using a kernel with APM disabled).
If this is correct, then one cannot count on the TSC to measure time...
Am I wrong?

Second, I was aware of the RTC (I played with rtctest.c provided in the linux kernel source code),
but I had not found any information about the latency. I was afraid the scheduler may take
a non-negligible amount of time before switching to the process blocked waiting on a "read
  /dev/rtc" (the "normal" beat of the scheduler is 100 Hz that is 10 msec). A quick glance
to one link given by David (http://www.uow.edu.au/~andrewm/linux/schedlat.html) suggests
one can get the answer to this question.

Finally, I am using sdl-1.2 where SDL_GetTicks() relies on gettimeofday() in the
linux implementation. Is it still the same code in sdl-1.3? Are there any critical
differences regarding timing between sdl-1.2 and sdl-1.3?

Lastly, is there a search interface to the sdl mailing list?
I am embarrassed to ask questions which may have been discussed in the past.

Cheers,

-- 
Christophe Pallier
http://www.pallier.org





More information about the SDL mailing list