pxt-calliope/docs/reference/input/running-time.md
2016-04-13 08:27:45 -07:00

30 lines
537 B
Markdown

# Running Time
Get the number of milliseconds elapsed since the script began. 1,000 milliseconds = 1 second.
```sig
input.runningTime();
```
### Returns
* [Number](/reference/types/number)
### Example: elapsed time
This code gets the elapsed time since the start of the program execution and displays it on the screen.
```blocks
let now = input.runningTime()
basic.showNumber(now)
```
### Lessons
[speed button](/lessons/speed-button)
### See also
[show number](/reference/basic/show-number), [pause](/reference/basic/pause)