Answers for "delay without blocking"

C++
0

delay without blocking

void millisdelay(long intervaltime) {
  long thetimenow = millis();
  while (millis() < thetimenow + intervaltime)
  {
    // nothing but wait
  }
}
millisdelay(5000); // delay 5000 seconds
Posted by: Guest on September-20-2021

Browse Popular Code Answers by Language