# How do I generate circles appearing one at a time, rather than a whole cluster of circles in p5.js

**URL:** <https://discourse.processing.org/t/how-do-i-generate-circles-appearing-one-at-a-time-rather-than-a-whole-cluster-of-circles-in-p5-js/24182>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [September 28, 2020, 4:35am UTC](https://discourse.processing.org/t/how-do-i-generate-circles-appearing-one-at-a-time-rather-than-a-whole-cluster-of-circles-in-p5-js/24182 "2020-09-28T04:35:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 28, 2020, 11:33am UTC](https://discourse.processing.org/t/how-do-i-generate-circles-appearing-one-at-a-time-rather-than-a-whole-cluster-of-circles-in-p5-js/24182/4 "2020-09-28T11:33:27Z")

</div>

> [@Hyperion65](#):
>
> if (millis%1000 =0) { do something }

if (millis%1000 == 0)  
The chances of this happening are extremely low at the instant that you are checking millis() during a frame (draw() cycle).

if (frameCount%60 == 0)  
This will work for frameCount since this increments each frame (draw() cycle).

This is a Processing example that uses millis():

> [@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…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-generate-circles-appearing-one-at-a-time-rather-than-a-whole-cluster-of-circles-in-p5-js/24182)._
