We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › restart program after certain time
Page Index Toggle Pages: 1
restart program after certain time (Read 709 times)
restart program after certain time
Sep 5th, 2007, 10:37pm
 
[Processing virgin warning!]

Hi,
I've used begin() in mousepressed() before to restart a program manually. (Can't remember where I picked up the "begin()", it doesn't seem to be in the language reference.)

Anyway, now I want to perform the action after a certain time, like in "if (millis() > 10000) { begin(); }".
It looks like I can't write this inside draw(), the program hangs. How can I do this?
Also, are millis() being reset upon calling begin()?
TIA
Steven
Page Index Toggle Pages: 1