Differences From Artifact [fea9147d40]:
- File utils/ofhttp/ProgressBar.h — part of check-in [336a6e129b] at 2015-04-26 14:57:19 on branch trunk — utils/ofhttp: Support for continuing downloads (user: js, size: 947) [annotate] [blame] [check-ins using]
To Artifact [41e4a8fdbc]:
- File
utils/ofhttp/ProgressBar.h
— part of check-in
[2743414e6e]
at
2015-05-05 20:16:48
on branch trunk
— utils/ofhttp: Only update BPS once per second
Calculating and updating it more frequently results in fluctuations.
The update interval of the progress bar is unchanged. (user: js, size: 998) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
18 19 20 21 22 23 24 |
@class OFDate;
@class OFTimer;
@interface ProgressBar: OFObject
{
intmax_t _received, _lastReceived, _length, _resumedFrom;
| | < | > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
@class OFDate;
@class OFTimer;
@interface ProgressBar: OFObject
{
intmax_t _received, _lastReceived, _length, _resumedFrom;
OFDate *_startDate, *_lastReceivedDate;
OFTimer *_drawTimer, *_BPSTimer;
bool _stopped;
float _BPS;
}
- initWithLength: (intmax_t)length
resumedFrom: (intmax_t)resumedFrom;
- (void)setReceived: (intmax_t)received;
- (void)draw;
- (void)calculateBPS;
- (void)stop;
@end
|