Testing time tracking
This commit is contained in:
parent
655220c68a
commit
c59b5c1e45
@ -75,15 +75,7 @@ static void hal_sleep_until(timestamp_t ts) {
|
|||||||
if (remaining <= 0) {
|
if (remaining <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
delayMicroseconds(remaining); // Delay for remaining microseconds
|
||||||
// Adjust the delay duration based on the remaining time
|
|
||||||
if (remaining >= 1000) {
|
|
||||||
delayMicroseconds(1000); // Delay for 1000 microseconds (1 millisecond)
|
|
||||||
} else if (remaining > 100) {
|
|
||||||
delayMicroseconds(100); // Delay for 100 microseconds
|
|
||||||
} else if (remaining > 0) {
|
|
||||||
delayMicroseconds(10); // Delay for 10 microseconds
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user