lang • timer


Time = Timer [ () ]

Return the number of elapsed seconds from the beginning of the program as a floating point number.

This function uses the system timer, so its return value is affected if the system clock is set e.g. by root with the date shell command.


Print Timer
Dim StartTime As Float
Dim DiffTime As Float
Dim I As Integer

StartTime = Timer

For I = 1 To 1000000

DiffTime = Timer - StartTime
Print DiffTime * 1000; " msec"
21.0999976844 msec

See also