# Help with delay/millis without influencing the framerate

**URL:** https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153
**Category:** Coding Questions
**Created:** [February 6, 2019, 12:19pm UTC](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153 "2019-02-06T12:19:25Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [February 6, 2019, 12:22pm UTC](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153/2 "2019-02-06T12:22:30Z")

</div>

yes, use millis() to make a timer

> [@The screen is updating after while loop is completed ? need help](https://discourse.processing.org/t/the-screen-is-updating-after-while-loop-is-completed-need-help/7119/3):
>
> here a example using a millis timer: long startT, stopT=1000; float ang = 0; float colc; color rf; void setup() { size(500, 500); colc=random(255); rf=color(colc, 0, 255-colc); } void myTimer() { if ( millis() \> startT + stopT ) { startT = millis(); println("\_next loop\_"); // what else you need to be done now? ang++; colc=random(255); rf=color(colc, 0, 255-colc); } } void draw() { background(255, 244, 206); myTimer(); translate(width/2, height/2); …

---

_[View the full topic](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153)._
