Differences From 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]
To Artifact [88c7d2589b]:
- File utils/ofhttp/ProgressBar.h — part of check-in [65681d0342] at 2015-05-16 23:59:39 on branch trunk — utils/ofhttp: Show ETA (user: js, size: 1018) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 | @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; | > | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | @interface ProgressBar: OFObject { intmax_t _received, _lastReceived, _length, _resumedFrom; OFDate *_startDate, *_lastReceivedDate; OFTimer *_drawTimer, *_BPSTimer; bool _stopped; float _BPS; double _ETA; } - initWithLength: (intmax_t)length resumedFrom: (intmax_t)resumedFrom; - (void)setReceived: (intmax_t)received; - (void)draw; - (void)calculateBPSAndETA; - (void)stop; @end |