JavaScript is single-threaded. Busy waiting while (getTime() < t) .. blocks the execution of the setInterval callbacks - and other possible events.
while (getTime() < t) ..
setInterval
The segmentation fault is not nice. But the program above is not a useful JavaScript program.
@luwar started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
JavaScript is single-threaded. Busy waiting
while (getTime() < t) ..
blocks the execution of thesetInterval
callbacks - and other possible events.The segmentation fault is not nice. But the program above is not a useful JavaScript program.