Skip to content

CreateTimer

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions

Blitz3DBlitzPlusBlitzBasic

CreateTimer

CreateTimer:Int32 hertz:Int32
Parameter Mode Type Default Description
hertz In Int32 required Ticks per second, above 0.

Returns: A timer handle.

Description

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.

Examples

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

Related Commands

CurrentDate, CurrentTime, FreeTimer, WaitTimer

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally