Hey Guys,
I have a thread running outside of the main thread. I have a timer that executes on a specific interval [currentSpeed]. Problem is I would like to change the value of currentSpeed.
What are my options for modifying this after its been added to the runLoop.
Hope that makes sense.
Thanks
Code:
- (void)setupTimerThread{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
timer = [NSTimer timerWithTimeInterval:1 * currentSpeed target:self selector:@selector(triggerTimer:) userInfo:nil repeats:YES];
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
[runLoop addTimer:timer forMode:NSRunLoopCommonModes];
[runLoop run];
[pool release];
}