Hopefully a quick one. I want to space out a command and have the spacing set a 1 second,
timer1 = createTimer(now.plusSeconds(1), [ |
but would like to reduce the delay to 250 milliseconds. I tried
timer1 = createTimer(now.plusMillis(250), [ |
but got an error in the log
script execution of rule with UID 'Kitchen_motion-2' failed: 'plusMillis' is not a member of 'java.time.ZonedDateTime';
After a lot of google, but I can’t seem to find an example of the ZonedDateTime member I need.
As a side note I have tried Thread :: sleep(250), but also must not be doing something right. Script execution of rule with UID 'Kitchen_motion-1' failed: The name 'thread' cannot be resolved to an item or type;
I have the timers setup and working, so prefer sticking with them, if possible, before finding the problem with the thread idea.