[SDL] Timer accuracy

Nicolai Haehnle prefect_ at gmx.net
Mon Sep 16 10:30:01 PDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 16 September 2002 18:05, David Olofson wrote:
> On Monday 16 September 2002 17:21, Latimerius wrote:
> > The interface allows for microseconds iirc (struct timeval::tv_usec)
> > and at least on Linux/i386 microsecond resolution is actually used.
>
> Right - and I guess you should get close even without a TSC, since main
> board hardware timers are also independent of the OS and scheduler.
> Should always be quite a bit better than 1 ms, I think.

The PIT's internal frequency is used when no TSC is available, and that is 
just above 1MHz (don't know the exact number right now) so yes, that's _a 
lot_ better than 1ms precision.

cu,
Nicolai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9hhVJsxPozBga0lwRAt9WAKCKWPEhhLc9rLphGYuZQ6/flyieeACZAaay
/SZ5gaKoDY0TnEufnC7Ez54=
=W2GP
-----END PGP SIGNATURE-----





More information about the SDL mailing list