ObjFW  Check-in [7460346551]

Overview
Comment:ofhttp: Fix ETA calculation for resumed files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.8
Files: files | file ages | folders
SHA3-256: 74603465514a43a345d7ff72b235192c6827ab52ecc95ae8c8be6451b462ff0d
User & Date: js on 2015-10-10 09:18:57
Other Links: branch diff | manifest | tags
Context
2015-10-17
12:18
Fix two forgotten instances of FD_SETSIZE on Win32 check-in: c37ca0932c user: js tags: 0.8
2015-10-10
09:18
ofhttp: Fix ETA calculation for resumed files check-in: 7460346551 user: js tags: 0.8
2015-10-04
13:10
OFString: int i -> size_t i check-in: 3d0c941e9f user: js tags: 0.8
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