pxt-calliope/docs/reference/input/running-time.md
2016-03-25 16:47:20 -07:00

573 B

Running Time

Get the number of milliseconds elapsed since the script began. 1,000 milliseconds = 1 second.

input.runningTime();

Returns

Example: elapsed time

This code gets the elapsed time since the start of the program execution and displays it on the screen.

let now = input.runningTime()
basic.showNumber(now)

Lessons

speed button

See also

show number, pause