Migrate docs from the other repo
This commit is contained in:
29
docs/reference/input/running-time.md
Normal file
29
docs/reference/input/running-time.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Running Time
|
||||
|
||||
Get the number of milliseconds elapsed since the script began. 1,000 milliseconds = 1 second.
|
||||
|
||||
```sig
|
||||
input.runningTime();
|
||||
```
|
||||
|
||||
### Returns
|
||||
|
||||
* [Number](/microbit/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](/microbit/lessons/speed-button)
|
||||
|
||||
### See also
|
||||
|
||||
[show number](/microbit/reference/basic/show-number), [pause](/microbit/reference/basic/pause)
|
||||
|
Reference in New Issue
Block a user