Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Creating a timer

$
0
0

Hi, I am in need of some assistance. I'd like to write code that will execute when you click the mouse, and I want the action to run for a maximum of four seconds. If the mouse is still pressed for longer than four seconds, the action will stop. However, I want the action to stop immediately once the mouse is released if the mouse is released after say for example two or three seconds. Also, I'd want this to be repeatable, so that you can do the action as many times as you want. Thank you.


Viewing all articles
Browse latest Browse all 2896

Trending Articles