This works, not that I think doing this is a good idea in most circumstances.
function delay(t) { var et=getTime()+t/1000; while (getTime() < et) { et=et; } }
@DrAzzy 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.
This works, not that I think doing this is a good idea in most circumstances.