{
[NSThread detachNewThreadSelector:@selector(timer) toTarget:self withObject:nil];
}
-(void)timer
{
[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(getGPRS) userInfo:nil repeats:YES];
//保持线程为活动状态,才能保证定时器执行
[[NSRunLoop currentRunLoop] run];
}
-(void)getGPRS
{
NSLog(@"NSTimer");
}