Time
millis( ) // gives time elapsed since the program started in milliseconds where there are 1000 milliseconds in 1 second.
seconds( ), minutes(), hours(), etc //provides actual time according to the computer's clockTimer
var initialTime = millis(); //called once at beginning
var draw=function(){
var elapsedTime = millis() - initialTime;
if (elapsedTime > 3000){ // 3 seconds has passed
println("3 seconds");
initialTime = millis(); //reset initial time
}
};Last updated