Granularity?

I don’t understand completly what the granularity concept means…

/*
quote:
SDL_Delay will wait at least the specified time, but possible longer due to
OS scheduling.

Note: Count on a delay granularity of at least 10 ms. Some platforms have
shorter clock ticks but this is the most common.
*/

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12) ?
(because 12+10(the granularity) =22)

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12)
?
(because 12+10(the granularity) =22)

The “granularity” is the resolution of the timer. If the timer
granularity is 10ms, you can wait for 10ms or for 20ms but not for 22
(it will wait for 20 or 30, depending on the implementation, I guess)

--Gabriel

10ms granularity means that the clock is only accurate to minimum 10ms.

that means if you tell it to wait 23 ms, it’ll wait 30.

might be more to it but thats the general idea :P> ----- Original Message -----

From: cmoibenlepro@hotmail.com (cmoibenlepro)
To:
Sent: Sunday, May 09, 2004 11:41 AM
Subject: [SDL] granularity?

I don’t understand completly what the granularity concept means…

/*
quote:
SDL_Delay will wait at least the specified time, but possible longer due
to
OS scheduling.

Note: Count on a delay granularity of at least 10 ms. Some platforms have
shorter clock ticks but this is the most common.
*/

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12) ?
(because 12+10(the granularity) =22)


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