How to trigger a timer in processing.
in
Programming Questions
•
4 months ago
I've tried to do some research but so far I haven't found anything that I can use here. I want to make a timer in processing which is triggered by a button press. So far this is what I have:
- void setup(){
- size (340,340);
- }
- void draw(){
- int times = millis();
- int timem = mills();
- int timeh = mills();
- textSize(32);
- fill(0,0,0);
- textSize(32);
- fill(0,0,0);
- text((times / 1000), 10 , 195);
- }
It times, but I can't get it to start when a rectangle is pressed. Any ideas? Also how can I get it it count minutes and hours too?
Thanks.
1