RaiMan / SikuliX-2014

SikuliX version 1.1.2 (until February 2018)
http://sikulix.com
805 stars 235 forks source link

Question regarding Observer's repeat method #289

Open mrmin123 opened 6 years ago

mrmin123 commented 6 years ago

Hi RaiMan, I was wondering if there was a specific rationale behind why the Observer/OberserverEvent classes' repeat() takes a long instead of a float as a parameter.

The relevant code is in ObserverEvent and Observer.

It seems reasonable to want to repeat the next iteration of the observer in a fraction of a second and not just full seconds. Also, with the current code, calling repeat with 0 (event.repeat(0)) or no parameters (event.repeat()) defaults the wait to 1 second instead of 0, which I believe is the expect result.

For the record, I've worked around the issue of not being able to set a sub-1-second delay by overriding sikuli's settings: sikuli.Settings.RepeatWaitTime = 0 (default is 1) which actually results in the 0-second delay I was expecting.

I'm not sure what the ongoing support schedule is for 1.1.x but I wanted to bring this up in case it is an unintended behavior.

Thanks!

RaiMan commented 6 years ago

Thanks for the pointer. I will check and fix what is necessary in your sense with 1.1.2 nightly the next days.