Skip navigation.
 
mlRe: Crash when using [NSTimer fire]
FROM : Shawn Erickson
DATE : Fri Nov 19 19:13:03 2004

On Nov 19, 2004, at 9:55 AM, Gwynne wrote:

> On Nov 19, 2004, at 12:39 PM, Shawn Erickson wrote:

>> Why are using using a timer that way? I don't follow how a timer of 5 
>> years is useful...
>>
>> Guessing at what you are attempting to do... consider using an 
>> NSConditionLock or some such thing if you are trying to gate 
>> something from running, etc.

>
> It's not always used that way. The timer has a variable interval. The 
> 5-year interval is used when the associated UI object has been 
> disabled so that I don't have to keep checking whether or not the 
> timer exists. It's a convenience.


Consider using NSDate distantFuture for you date.

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSDate.html#//apple_ref/doc/uid/20000188/
distantFuture
>

I have never seen or heard of an issue with long period timers. You may 
want to post a code sample that can reproduce the failure and file a 
bug with it.

-Shawn

Related mailsAuthorDate
mlCrash when using [NSTimer fire] Gwynne Nov 19, 18:19
mlRe: Crash when using [NSTimer fire] Shawn Erickson Nov 19, 18:39
mlRe: Crash when using [NSTimer fire] Gwynne Nov 19, 18:55
mlRe: Crash when using [NSTimer fire] Shawn Erickson Nov 19, 19:13
mlRe: Crash when using [NSTimer fire] Gwynne Nov 19, 19:39
mlRe: Crash when using [NSTimer fire] John C. Randolph Nov 20, 00:04