-
• #2
What is the shortest reliable duration?
A millisecond should be safe, but you should be able to get a bit less than that. Obviously if other code is executing that can delay execution, but if as you say your code has finished executing then you'll be fine.
If you need to get very fast, you might be able to use
digitalPulse
,etc. Another option is to set up a PWM output, connect it to an input, and then watch that input withsetWatch(...., {irq:true})
and use compiled code.I'm seeing limitations of the IDE keeping up around 80-100ms
Do you have an example of code that does this?
Sun 2018.08.26
I have a need for extremely accurate function call timing.
It would be nice to have a range of argument values at:
http://www.espruino.com/Reference#l__global_setInterval
I'm seeing limitations of the IDE keeping up around 80-100ms
But, as in browsers, faster times might be possible?
http://www.adequatelygood.com/Minimum-Timer-Intervals-in-JavaScript.html
What is the shortest reliable duration?
The above pre-supposes all called code would execute before the next call.
Also, need to apply a delay using setTimeout() under the same reliable constraint.