Why dont you call process
after you get the response as follows,
-(void)process
{
timestamp=[NSString stringWithFormat:@"%1.f",progressValue];
NSString *contour=@"&bandschema=4";
NSString *url6=[NSString stringWithFormat:@"http://contour.php? callback=contourData%@&type=json×tamp=%@%@",timestamp,timestamp,contour];
NSURL *url1=[NSURL URLWithString:url6];
__weak ASIHTTPRequest *request1 = [ASIHTTPRequest requestWithURL:url1];
[request1 setCompletionBlock:^{
responseString = [request1 responseString];
[self plotPoint:self.responseString];
if (somecondition)//based on some condition to break the chain when needed
[self process];
}];
[request1 setFailedBlock:^{
NSError *error=[request1 error];
NSLog(@"Error: %@", error.localizedDescription);
if (somecondition)//based on some condition to break the chain when needed
[self process];
}];
[request1 startAsynchronous];
}
This way you can keep 1.6 as the exact time interval after getting a response to creating a new request.