what you could do is when you start the timer save when you started it and how long it lasts in your saved var. if the handler fires then remove it. if not when you login you can then restart it by comparing when it was originally started and what time/date it is now. then you would also need to handled expired timers while you where logged off.
i wonder if it an expiration-oriented timer system would be worthwhile.
something that would be low precision (like specified in seconds) for things like cooldowns and other timers that are not repeating.
rather than creating them to fire in 15 seconds, you'd specify them to fire at a future date. it would be refreshable by simply resubmitting the timer so that you could save your timers between sessions and then reload them.
probably would be dependent upon the local cpu time not changing...
I thought about the same thing.
LoadAddon - > Set first time run instruction -> Set Timer to run at later date in the db
if timer-date > x then
reset timer to now
then also setup an update frequency, to update the timer
Unless there is an easy way to track a session, despite the client crashing or ending unexpectedly.
eh one way that i did it in my dailies addon was to get the time() index of when the timmer is suposed to expire and store that. Then run an on update frame checking the time with about a 60-120 sec update interval.