ccutrer / openhab-jrubyscripting

JRuby Libraries for Openhab
Eclipse Public License 2.0
1 stars 1 forks source link

use Duration#to_millis instead of Duration.to_f * 1_000 #145

Closed ccutrer closed 1 year ago

ccutrer commented 1 year ago

LGTM but I'm not sure if it's a good idea to provide a default timeout like this.

Actually, these are the default timeouts that openHAB uses internally. AFAICT, you have to have a timeout for these methods.

jimtng commented 1 year ago

Ahh... before you defined the methods, it would've used the Java overloaded methods which provided the default timeout (from java). Now you're calling the overloaded version that requires a timeout.... hence the need to provide one. Unless you could also call the overloaded version without the timeout when none is specified. Probably not worth the hassle for the same result. Thanks for clarifying it.