Some experiments on timeouts and intervals:
This does the timeout and the interval method and calculates some metrics. The most important for me is the sum, which is the summed up errors against the expected triggering time.
This results in
This seems to hint to the timeout method accumulating only a tenth of the error the interval does with 100ms waiting time and 1000 tries.
I would expect the error to get smaller over time with the timeout method.
© Espruino, powered by microcosm.
Report a problem