Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2010-08-27 20:32:32
Size: 1354
Editor: SheenaSmith
Comment: update content (old wiki)
Revision 3 as of 2010-09-24 20:53:31
Size: 1371
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
A 32-bit value representing the number of milliseconds since the SDL library initialized. Returns a 32-bit value representing the number of milliseconds since the SDL library initialized.
Line 20: Line 20:
*<<BR>>An unsigned 32 bit integer number. The returned value represents the number of milliseconds since SDL library initialization <<BR>>* *<<BR>>Returns an unsigned 32 bit integer number. The returned value represents the number of milliseconds since SDL library initialization. <<BR>>*

DRAFT

SDL_GetTicks

Use this function to get the number of milliseconds since the SDL library initialization.

Syntax

Uint32 SDL_GetTicks(void)

Return Value

Returns a 32-bit value representing the number of milliseconds since the SDL library initialized.

-or-

*
Returns an unsigned 32 bit integer number. The returned value represents the number of milliseconds since SDL library initialization.
*

Code Examples

You can add your code example here

Remarks

Note that this value wraps if the program runs for more than ~49 days.

*
{i} This function can be used to build a double click handling routine. In fact, there is currently no such mouse event in the SDL event subsystem. One solution consists of calculating the interval between two mouse clicks by saving the values returned by SDL_GetTicks(). Then if the difference between two values returned by SDL_GetTicks() is inside a predefined threshold, the application can fire a software double click event.
*


CategoryAPI, CategoryTimer

None: SDL_GetTicks (last edited 2013-12-07 13:13:16 by PhilippWiesemann)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit