runIn(less than a second) possible?

The runIn() function only allows integer delays. Is there any equivalent that would allow something like runIn(0.5, myFunction)?

I understand why it would be integers in SmartThings, given that everything had to go back and forth across the network, but in Hubitat, the processing is all local. (Of course, you could still abuse this and saturate the local processor, but let's assume I only want to delay 1/3 to 1/2 a second. I'm not trying to call something every millisecond.)

There is runInMillis() that will do what you want

Fantastic! Does it do the same thing as runIn() where if it gets called twice, it only executes the second one?

I wrote a little test App and it seems to work exactly the same.

1 Like