ObjFW  Check-in [5832ac9420]

Overview
Comment:ofhttp: Fix ETA calculation for resumed files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5832ac9420694ef109edcdf0995b6e781a85624314579c38dd7e6eb1773ec375
User & Date: js on 2015-10-10 09:18:16
Other Links: manifest | tags
Context
2015-10-17
10:59
Add a port registry for the Wii check-in: ed4549ddd3 user: js tags: trunk
2015-10-10
09:18
ofhttp: Fix ETA calculation for resumed files check-in: 5832ac9420 user: js tags: trunk
2015-10-04
13:10
OFString: int i -> size_t i check-in: 57f386c9a7 user: js tags: trunk
Changes

Modified utils/ofhttp/ProgressBar.m from [ea91008bdd] to [3f79e83b5b].

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
		[self _drawReceived];
}

- (void)calculateBPSAndETA
{
	_BPS = (float)(_received - _lastReceived) /
	    -(float)[_lastReceivedDate timeIntervalSinceNow];
	_ETA = (double)(_length - _resumedFrom - _received) / _BPS;

	_lastReceived = _received;
	[_lastReceivedDate release];
	_lastReceivedDate = [[OFDate alloc] init];
}

- (void)stop







|







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
		[self _drawReceived];
}

- (void)calculateBPSAndETA
{
	_BPS = (float)(_received - _lastReceived) /
	    -(float)[_lastReceivedDate timeIntervalSinceNow];
	_ETA = (double)(_length - _received) / _BPS;

	_lastReceived = _received;
	[_lastReceivedDate release];
	_lastReceivedDate = [[OFDate alloc] init];
}

- (void)stop