What is the fastest time or shortest duration for reliable setInterval() #1180
Unanswered
espruino-discuss
asked this question in
JavaScript
Replies: 1 comment
-
Posted at 2018-08-28 by @gfwilliams
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
Do you have an example of code that does this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-08-27 by Robin
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.
Beta Was this translation helpful? Give feedback.
All reactions