I am communicating with a webservice to retrieve a numerical value that comes into my function as an NSString. This number tells me the precise amount of time to wait until I perform another action, and it is critical that it be precise.
As an example, if the string is "89283", then this means I must wait 89.283 seconds. So I'd like to know the best way in Objective-C for iPhone to convert this string to a precise value that I can pass to the performSelector:afterDelay: function. Here's my sample code, but I'm guessing its not accurate.
NSString *myDelayString = @"89283";
int myDelay = [myDelayString intValue]/1000;
[self performSelector:@selector(myFunction) withObject:nil afterDelay:myDelay];
I think the myDelay value really should be a NSTimeInterval, but I'm not sure how to make that from the string I have. Thanks in advance.