mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 23:00:45 +01:00
[ion] fix sleep functions in emscripten build
This commit is contained in:
@@ -35,14 +35,14 @@
|
||||
void delay_ms(mp_uint_t delay) {
|
||||
uint32_t start = millis();
|
||||
while (millis() - start < delay && !micropython_port_should_interrupt(true)) {
|
||||
msleep(1);
|
||||
mssleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
void delay_us(mp_uint_t delay) {
|
||||
uint32_t start = micros();
|
||||
while (micros() - start < delay && !micropython_port_should_interrupt(false)) {
|
||||
usleep(1);
|
||||
ussleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user