How about something like...
NSTimer *timer = [NSTimer timerWithTimeInterval:60 target:self selector:@selector(getDataThread:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
- (void)getDataThread:(id)foo {
dispatch_async(self.downloadQueue, ^{
// code you want to run asynchronously
});
}
It seems you want some block of code to run asynchronously... but you want that to also run at a timed interval, so I think this should suffice.
If you want to ditch blocks and dispatch_async
altogether you could look at NSOperationQueue
, keeping in mind NSOperationQueue
is built on GCD but you don't need to worry about interfacing with it directly.