Documentation

yield

Function

void yield()

Yields the current execution. Execution will be resumed the next game tick. This is the same as calling yield(1).

void yield(uint frames)

Yields the current execution for a specific number of frames. Execution will be resumed after the given number of frames have passed. Do not use this function to yield for a specific time as this function is framerate dependant - use sleep() for that instead.

uint frames

The number of frames to yield for. Passing 0 here will not yield at all, and should be considered a no-op. Passing 1 is the same thing as calling yield().