Reference

gk_schedule(3gk)

support periodic execution of commands

NAME

gk_schedule, gk_cancelScheduled - support periodic execution of commands

SYNOPSIS

gk_schedule tag command ?timer?
gk_cancelScheduled tag

DESCRIPTION

These commands allow you to deal with executing repetitive commands (such as move object messages) so that commands do not cause a backlog. Commands (such as an update) are added to a queue without duplicates, so only a single command will be executed within a given time interval (default 1/10 second).

This facility provides a convenient front end to Tk's after command, while avoiding queueing up multiple redundant messages.

COMMANDS

gk_schedule tag command ?timer?

Schedule command to be executed sometime in the future. If there is already a command with the same tag, do not add this command to the queue. By default, commands will be queued up to execute in 100 milliseconds, but this can be changed using the timer parameter.

gk_cancelScheduled tag

Cancel a previously scheduled command, identified by tag, if it has not already been run.

AUTHOR

Mark Roseman ([email protected])