This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_TICKS_PASSED

Use this macro to compare SDL ticks values.

Syntax

SDL_TICKS_PASSED(A, B)

Function Parameters

A

the first ticks values

B

the second ticks values

Return Value

Returns return "true" if A has passed B.

Code Examples

/* if you want to wait 100 ms, you could do this: */
Uint32 timeout = SDL_GetTicks() + 100;
while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
    /* ... do work until timeout has elapsed */
}

Version

This function is available since SDL 2.0.1.

SDL_GetTicks

CategoryAPI, CategoryTimer, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.