Re: Synchronize timer with internal clock
Re: Synchronize timer with internal clock
- Subject: Re: Synchronize timer with internal clock
- From: Frank Fenn <email@hidden>
- Date: Fri, 14 Mar 2003 17:02:19 -0700
Hi all,
I've tried the following code:
NSCalendarDate *now = [NSCalendarDate calendarDate];
NSCalendarDate *run = [now dateByAddingYears:0 months:0 days:0
hours:0 minutes:1 seconds:(60-[now secondOfMinute])];
timer = [[NSTimer alloc] initWithFireDate:run
interval:60
target:self
selector:@selector(timerAction:)
userInfo:nil
repeats:YES];
This is not working for me (10.2.4) - a NSLog of "run" before and
[timer fireDate] after the timer is initialized shows
the right date/time. [timer isValid] returns 1. The timerAction is
never executed. A manual [timer fire] works.
Any ideas?
--
regards
Frank Fenn - Bright Light Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.