Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-05-17 22:28:26
Size: 682
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
Revision 2 as of 2010-08-27 20:32:32
Size: 1354
Editor: SheenaSmith
Comment: update content (old wiki)
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
= SDL_SDL_GetTicks = = SDL_GetTicks =
Line 16: Line 16:
A 32-bit value representing the number of milliseconds since the SDL library initialized. ??? A 32-bit value representing the number of milliseconds since the SDL library initialized.

''-or-''

*<<BR>>An unsigned 32 bit integer number. The returned value represents the number of milliseconds since SDL library initialization <<BR>>*
Line 26: Line 30:
*<<BR>>
{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. <<BR>>*
Line 27: Line 34:
 .[[SDL_Delay]] * <<Color2(green,This isn't reciprocal yet.)>>

DRAFT

SDL_GetTicks

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

Syntax

Uint32 SDL_GetTicks(void)

Return Value

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

-or-

*
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