It would be nice if we could bump a timer up closer to (or farther from) the firing time without altering the timer conditions in any way. Say I have a timer that fires every 24 hours. If the user closes mushclient and then opens it 23.5 hours later, I'd like to be able to bump the timer down to 30 minutes left while leaving the 24 hour recurrence. It doesn't seem like that is currently possible.
update the position of a recurring timer
Posted by Fiendish on Tue 22 Mar 2011 08:55 AM — 4 posts, 12,295 views.
You could use SetTimerOption to change the timer "offset". That is, the time within the period (eg. the period being 24 hours) at which the timer fires. So if you made the offset 23.5 hours then it should fire in 0.5 hours, and then 24 hours later (ie. in 24.5 hours).
I guess I didn't understand the documentation for the SetTimerOption offset options. Could the help be expanded to clarify how it works?
I have amended the documentation for SetTimerOption as follows:
Looking at the code, I was wrong about the direction of the offset. It is subtracted from the fire time (otherwise it would exceed the timer time). So as in the example above, an offset of 45 minutes for a one-hour timer makes it fire 15 minutes after being reset, and then every hour after that.
Quote:
The "offset" options are the time offset within the interval. In other words, if the interval is an hour, but the offset is 45 minutes, then the timer fires 15 minutes into the hour (it still fires every hour, but 45 minutes is subtracted from the fire time). This lets you stagger timer fire times.
The "offset" options are the time offset within the interval. In other words, if the interval is an hour, but the offset is 45 minutes, then the timer fires 15 minutes into the hour (it still fires every hour, but 45 minutes is subtracted from the fire time). This lets you stagger timer fire times.
Looking at the code, I was wrong about the direction of the offset. It is subtracted from the fire time (otherwise it would exceed the timer time). So as in the example above, an offset of 45 minutes for a one-hour timer makes it fire 15 minutes after being reset, and then every hour after that.