# millis()

### Example

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FTE8nEdowCwbdB4G8BY8L%2Fmillis1().gif?alt=media&#x26;token=c867da6b-c9ed-44fd-815f-3600e5fb900e" alt=""><figcaption></figcaption></figure>

```python
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.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
