SDL_GetTicks() accuracy?

Hi, I wonder what is the minimal time difference en milliseconds between two
calls to SDL_GetTicks() (win32 platform) ?

Thanks___________________________________________________________
Do You Yahoo!? – Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com

SDL_GetTicks() seems accurate down to ±1 tick or so. SDL_Delay() is only
accurate to 10 ticks, though.

Chris wrote:> Hi, I wonder what is the minimal time difference en milliseconds between two

calls to SDL_GetTicks() (win32 platform) ?

Thanks


Do You Yahoo!? – Une adresse @yahoo.fr gratuite et en fran?ais !
Yahoo! Mail : http://fr.mail.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

the minimum difference is 0. This is quite easy to attain on todays
processors, because GetTicks() is in milliseconds, so it is possible to have
a fraction of a millisecond pass b/w calls, but since it returns an integer,
you get the truncated version ( 0 ).

M@_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

I actually got -1 in one of my programs :frowning: Running SDL 1.2.4 on Linux, two
consecutive calls to SDL_GetTicks() with some code in between returned
decreasing values almost everytime. I never investigated it further, just
clamped the difference (the project was to be finished within -1 day :).
Did anyone else see anything like this ?
JacekOn Sun, Dec 01, 2002 at 06:43:28PM +0000, Matt Monson wrote:

the minimum difference is 0. This is quite easy to attain on todays
processors, because GetTicks() is in milliseconds, so it is possible to
have a fraction of a millisecond pass b/w calls, but since it returns an
integer, you get the truncated version ( 0 ).


±------------------------------------+
|from: J.C.Wojdel |
| J.C.Wojdel at cs.tudelft.nl |
±------------------------------------+