# Timers Not Frame Rate Dependent & Starting On Demand - Oh Please Oh Please :)

**URL:** <https://discourse.processing.org/t/timers-not-frame-rate-dependent-starting-on-demand-oh-please-oh-please/23994>\
**Category:** Coding Questions\
**Created:** [September 21, 2020, 6:06am UTC](https://discourse.processing.org/t/timers-not-frame-rate-dependent-starting-on-demand-oh-please-oh-please/23994 "2020-09-21T06:06:45Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [September 21, 2020, 9:38pm UTC](https://discourse.processing.org/t/timers-not-frame-rate-dependent-starting-on-demand-oh-please-oh-please/23994/9 "2020-09-21T21:38:20Z")

</div>

Hello,

> **[reference | p5.js](https://p5js.org/reference/#/p5/millis)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

This may (or may not) help:

> [@Need assistance with timing! \[millis()\]](https://discourse.processing.org/t/need-assistance-with-timing-millis/18854/4):
>
> I provided a simple example: int whattimeisitnow; int whattimeisitatstartofstopwatch; int timepassedtoresetstopwatch = 1000; //setup runs once void setup() { whattimeisitatstartofstopwatch = millis(); } //draw loops 60 frames per sec void draw() { whattimeisitnow = millis(); if (whattimeisitnow \> whattimeisitatstartofstopwatch + timepassedtoresetstopwatch) { println("1000 ms have passed!"); whattimeisitatstartofstopwatch = millis(); //reset st…

You can use a mouse, key or any event to update:  
_whattimeisitatstartofstopwatch_

Once you wrap your head around this it becomes easy to code.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/timers-not-frame-rate-dependent-starting-on-demand-oh-please-oh-please/23994)._
