please format code with </> button * homework policy * asking questions
int lastTimeCheck;
int timeIntervalFlag = 3000; // 3 seconds because we are working with millis
void setup() {
size(500,500);
background(0);
fill(255,0,0);
square(0,0,250);
fill(0,255,0);
square(250,0,250);
fill(0,0,255);
square(0,250,250);
fill(255,255,0);
square(250,250,250);
lastTimeCheck = millis();
}
void draw() {
if ( millis() > lastTimeCheck + timeIntervalFlag ) {
lastTimeCheck = millis();
println( “something awesome happens here” );
}
}