Timers in a Foundation Tool
Timers in a Foundation Tool
- Subject: Timers in a Foundation Tool
- From: Brian Ganninger <email@hidden>
- Date: Fri, 4 Jul 2003 15:52:44 -0500
Dear List,
Sorry if this is a repeated question, but after searching the archives
for 2 hours I give. I have a foundation tool that I want to leave
running with a timer that fires every minute. Below is the non-working
test code I strapped together. I can't figure out how to target the
timer so it'll call the launchEngine companion method.
Any input is greatly appreciated.
Sincerely,
Brian Ganninger
#import <Foundation/Foundation.h>
void launchEngine()
{
NSLog(@"Hello again...");
}
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2
target:nil selector:launchEngine() userInfo:nil repeats:TRUE];
sleep(1000);
[pool release];
return 0;
}
_______________________________________________
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.