I need to ping a server at fixed intervals. I am currently using the following:
[NSTimer scheduledTimerWithTimeInterval:5.0f
target:[Socket getInstance]
selector:@selector(sendHeartBeats)
userInfo:nil
repeats:YES];
This calls function sendHeartBeats
at an interval of 5 sec.
Do i need to call this on a separate thread so that my main thread will not be affected?