Here's a loop that will break after 9 seconds:
for (unsigned long starttime = millis(); millis() - starttime < 9000; ) {
}
Here's a loop that will break after 9 seconds:
for (unsigned long starttime = millis(); millis() - starttime < 9000; ) {
}