Open dominikh opened 11 years ago
I did not ask a question, I filed a task.
Currently, when using Timer#interval=
to change a timer's interval, it will still use the previous interval for the next tick, before it switches to the new interval.
Hi Domink I did not intend to offend am just a beginner, I have tried to find this timer#interval to see if i can fix it and logically speaking should it not be in timer.rb? Only been programming for 1 month and 2 weeks :)
Not offended here.
Yes, it's in /lib/cinch/timer.rb
. Currently it's a plain attribute accessor (attr_accessor :interval
).
And if I understand correctly you want it to instantly update?
I want that setting a new interval will abort the current sleep period and start with the new interval, yes.
Currently, if you have a timer with an interval of say 1 hour, and after 2 minutes you change the interval to 1 second, it will still take 58 minutes before the timer fires and uses the new interval.
Hi I don't understand exactly what you mean with that question?