millis()

Gets system's milliseconds

Example

text('Milliseconds since starting this sketch:',200,250)
text(millis(), width/2, height/2)

Syntax

millis()

Description

The millis() function works by keeping track of the number of milliseconds that have passed since the program started running.

You can use this in your program to create time-based behaviors.

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!

We'd love to hear your Feedback/Comments here.

Last updated