Skip to content

WaitTimer

Narta Xaymar Dirks edited this page Nov 25, 2026 · 8 revisions

WaitTimer BlitzBasic

WaitTimer:Int32 timer:Int32
Parameter Mode Type Default Description
timer In Int32 required The timer handle.

Returns: The number of ticks since the last call, at least 1.

Description

Waits for the next tick of a timer and returns how many ticks went by since the last call, which is 1 when your loop keeps up and more when it fell behind. Do not call it on a timer that is paused.

Examples

timer = CreateTimer(100)
ticks = WaitTimer(timer)
Print ticks >= 1
FreeTimer timer
1

Related Commands

CreateTimer BlitzBasic, FreeTimer BlitzBasic, Microseconds BlitzLLVM, MilliSecs BlitzBasic

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally