Skip to content

ProfileBegin

Narta Xaymar Dirks edited this page Nov 1, 2026 · 1 revision

ProfileBegin

ProfileBegin:Void key:String
Parameter Mode Type Default Description
key In String required The name of the part.

Description

Starts timing a part of the program under a key of your own. The key is a name you choose, in any case, up to 63 characters, and up to 64 keys can be used; a key can not be the name of one of the runtime's items (see ProfileItemName). After ProfileEnd the time is added to the key for the frame, so a part that runs several times in a frame (or is started again later in it) adds up. The time for each frame is read with ProfileValue, listed by ProfileSlow and added up by the report of ProfileFPS, next to the items of the runtime. Without --profile (or -d), or with the timers off (ProfileEnable), this command does nothing.

Differences

  • This is a BlitzLLVM extension: the original has no such command.

Examples

Graphics 64, 64, 0, 2
For i = 1 To 10
	ProfileBegin "ai"
	Delay 2 ; the part of the program that is measured
	ProfileEnd "ai"
	Cls
	Flip
	Print "ai took " + ProfileValue("ai") + " ms"
Next

Related Commands

ProfileEnable, ProfileEnd, ProfileFlipCount, ProfileFPS, ProfileItemCount, ProfileItemName, ProfileOutput, ProfileSample

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally