Ben Copsey

Use addTimeInterval: on iPhone OS

... ... @@ -21,7 +21,7 @@
#import "ASIInputStream.h"
// Automatically set on build
NSString *ASIHTTPRequestVersion = @"v1.2-35 2009-12-17";
NSString *ASIHTTPRequestVersion = @"v1.2-36 2009-12-17";
NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain";
... ... @@ -3091,7 +3091,11 @@ static BOOL isiPhoneOS2;
// Yes, put this request to sleep until a second is up, with extra added punishment sleeping time for being very naughty (we have used more bandwidth than we were allowed)
double extraSleepyTime = (-bytesRemaining/(maxBandwidthPerSecond*1.0));
[throttleWakeUpTime release];
#if TARGET_OS_IPHONE
throttleWakeUpTime = [[bandwidthMeasurementDate addTimeInterval:extraSleepyTime] retain];
#else
throttleWakeUpTime = [[bandwidthMeasurementDate dateByAddingTimeInterval:extraSleepyTime] retain];
#endif
}
}
[bandwidthThrottlingLock unlock];
... ...