
28 Dec
2005
28 Dec
'05
7:06 p.m.
Andrew Schweitzer wrote: [snip]
A related question: how do you ask whether a timer is still running? I think you could call expires_at() and compare to current time. It looks like there might be two issues with this: 1) Will crash if the timer is expired? (haven't tried just took a quick look at code). 2) Oddly enough getting the current time can be quite expensive, for example on Wince (I think because you have to get data from the kernel). It might be a lot faster to just say "I'm expired" if impl_ is null.
I was mistaken, it won't crash. Re-looked at code and tried in debugger. Ignore 1.