Skip to content

CreateTimer

Claude edited this page Oct 26, 2026 · 6 revisions

CreateTimer

Command Index · BlitzBasic · Runtime

CreateTimer hertz%  ; returns Int

Works in: Blitz2D, BlitzPlus, Blitz3D

Creates a timer that ticks a given number of times per second. WaitTimer waits for the next tick, which keeps a loop at a steady speed without depending on how fast the computer is.

timer = CreateTimer(50)
For i = 1 To 5
	WaitTimer(timer)
Next
FreeTimer timer
Print "five ticks at 50 per second"
five ticks at 50 per second
Parameter Type Default Description
hertz Int required Ticks per second, above 0.

Returns: A timer handle.

Related commands

Command Index · BlitzBasic · Runtime

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally