NAME

iosWaitForEvent - wait not more than x milliseconds for an event to be delivered

SYNOPSIS

iosWaitForEvent ms

DESCRIPTION

This command waits not longer than the given amount of milliseconds and returns the actual amount of milliseconds, after which an event was received. If at least one event was received, the number of milliseconds after which the event was received, is returned. If no event was received, the given argument is returned.
Example:
set waited [iosWaitForEvent 200]
if {$waited<200} {
	# at least one event occured, loop over all
	while {[iosEventsQueued]} {
		set ev [iosGetEvent]
		...
	}
} else {
	# no event occured
}

Read more about event processing.

The result is always an integer, which reflects the amount of time the command actually waited. The internal event loop is blocked while the command is waiting for events.

KEYWORDS


Copyright © 2000 Gerhard Hintermayer.