Use CFRunLoopRunInMode time interval instead usleep.