glutTimerFunc - Man Page

Sets the Timer callback for the current window.

Library

OpenGLUT - idletimer

Synopsis

#include <openglut.h>

void
glutTimerFunc(unsigned int msec, void( *callback )( int data ), int data);

Parameters


msec

Milliseconds till invocation.


callback

Client function for timer event.


data

Arbitrary data; passed to


callback

.

Description

After


at least

msec

milliseconds, OpenGLUT will call


callback

, passing in your user-supplied


data

parameter. OpenGLUT will call your function only once.

This callback is


not

bound to any window.

Caveats

Unlike most other callbacks, timers only occur once.

Unlike most other callbacks, you cannot deregister a timer callback.

Unlike most other callbacks, you can register an arbitrary number of timers.

See Also

glutIdleFunc(3) glutMainLoop(3) glutMainLoopEvent(3)

Referenced By

glutIdleFunc(3).