I would like to have a delay that does not block anything that is sub one second. Say a minimum of 0.25 seconds. How can this be done? eg like luup.call_delay but with a delay shorter than one second - both in Vera & openLuup.
If you’re not calling it too frequently, then what’s wrong with a blocking call? I think your only option on Vera would be luup.sleep()
, since delays and timers can only be specified in seconds, IIRC.
Under openLuup, however, the intrinsic delay and timer functions work with sub-millisecond resolution, although you’d have to call them using their object-oriented methods, rather than luup.xxx()
, I think, (I’d need to check.)
I can obviously provide examples.
Reactor routinely makes 0 (zero) delay calls and this works fine on both Vera Luup and openLuup. It functions as a yield of sorts–you don’t know when you’re actually going to get called back, but it’s usually pretty darned quick (milliseconds).