THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!
Use this macro to compare SDL ticks values.
SDL_TICKS_PASSED(A, B)
A |
the first ticks values |
B |
the second ticks values |
Returns return "true" if A has passed B.
/* if you want to wait 100 ms, you could do this: */
100;
Uint32 timeout = SDL_GetTicks() + while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
/* ... do work until timeout has elapsed */
}
This function is available since SDL 2.0.1.
CategoryAPI, CategoryTimer, CategoryDraft