📜  毫秒翻转 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:23.154000             🧑  作者: Mango

代码示例1
unsigned long lastTime = millis();
unsigned long interval = 1000;

void loop() {
  if (millis() - lastTime >= interval) {

    //do something every second

    lastTime = millis(); //reset timer
}