I am adding operations to the queue using something like this
NSInvocationOperation *operation0 = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(doStuff1)
object:nil];
[queue addOperation:operation0];
[operation0 release];
NSInvocationOperation *operation1 = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(doStuff2)
object:nil];
[queue addOperation:operation1];
[operation1 release];
NSInvocationOperation *operation2 = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(doStuff3)
object:nil];
[queue addOperation:operation2];
[operation2 release];
The queue is set to do just one operation at a time. So it will run the 3 methods without delay, one after another. Is that a way to add a small delay, lets say 0.5 seconds or whatever between each operation, so instead of running
doStuff1
doStuff2
doStuff3
the queue would do
doStuff1
sleep for X seconds
doStuff2
sleep for X seconds
doStuff3
?
thanks.