int milli;
int hours;
int minutes;
int seconds;
void setup () {
size(600, 400);
}
void draw() {
background(0);
milli = millis();
seconds = milli / 1000;
minutes = seconds / 60;
hours = minutes / 60;
text("Time = " + hours + ":" + minutes + ":" + seconds + ":" + milli, 10, 10);
//This text shows every number of millis, seconds, and minutes as if their independant numbers that don't reset to 0.
//aka don't loop around every particular number. millis should go to 999 then to 0, and repeat.
//Seconds should be based on every 1000 millis, and zero back to 0 at 60000. same for minutes.
//My theory is to create multiple functions which return a "looping" of each variable from 0 to it's own respective highest num.
}
//millis() = 999… “Time = 00:00:00:999”
//Formatting it a second issue I can deal with later.
//while millis() < 999, “Time = 00:00:00:millis()”
//While (millis() >= 1,000 && millis() <= 9,999), “Time = 00:00:0sec:millis()”
//While (millis() >= 10,000 && millis() <= 59,999), “Time = 00:00:sec:millis()”
//While (millis() >= 60,000 && millis() <= 69,999), “Time = 00:0min:0sec:millis()”
//While (millis() >= 70,000 && millis() <= 599,999), “Time = 00:0min:sec:millis()”
//While (millis() >= 600,000 && millis() <= 609,999), “Time = 00:min:0sec:millis()”
//Any instance of 0min or 0sec means that the 0 doesnt normally go there if num is < 10, it’ll look like 00:3:00 instead of 00:03:00 like a normal timer.
//123456 … millis = 999, leaving 123 as seconds. 120 is a multiple of 60, making min = 2. 3 sec left over so proper format is 00:02:03:456.
//2784624 … millis = 624. want to precisely measure every instance of hour, min, sec to allow 00:00:00:000 format to apply.
//If number goes beyond 24 hours then it’ll go into days then other extensions of time. RN I’m only worried about up til 10 hours.