-(IBAction)initialTimer
{
if (!soundTimer) {
soundTimer = [NSTimerscheduledTimerWithTimeInterval:0.5ftarget:selfselector:@selector(testTimer) userInfo:Nilrepeats:YES];
}
}
-(IBAction)invalidate
{
[soundTimersetFireDate:[NSDatedistantFuture]];
// [soundTimer invalidate];
}
-(IBAction)restart
{
[soundTimersetFireDate:[NSDatedistantPast]];
// [[NSRunLoop currentRunLoop]addTimer:soundTimer forMode:NSDefaultRunLoopMode];
// [soundTimer fire];
}
-(void)testTimer
{
soundCount ++;
TTLog(@"................%d",soundCount);
}