📅  最后修改于: 2022-03-11 14:57:23.154000             🧑  作者: Mango
unsigned long lastTime = millis();
unsigned long interval = 1000;
void loop() {
if (millis() - lastTime >= interval) {
//do something every second
lastTime = millis(); //reset timer
}