📜  无阻塞延迟 - C++ 代码示例

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

代码示例1
void millisdelay(long intervaltime) {
  long thetimenow = millis();
  while (millis() < thetimenow + intervaltime)
  {
    // nothing but wait
  }
}
millisdelay(5000); // delay 5000 seconds