|
|
|
@ -2422,7 +2422,8 @@ void sleep(float time) { // sleeps for intervals more than 0.01 milli seconds
|
|
|
|
unsigned long time_us = (unsigned long)(time * 1000000.0);
|
|
|
|
unsigned long time_us = (unsigned long)(time * 1000000.0);
|
|
|
|
unsigned long startSleep = micros();
|
|
|
|
unsigned long startSleep = micros();
|
|
|
|
while ((micros() - startSleep) < time_us) {
|
|
|
|
while ((micros() - startSleep) < time_us) {
|
|
|
|
busy_wait_us(100);
|
|
|
|
// busy_wait_us(100);
|
|
|
|
|
|
|
|
delayMicroseconds(100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|