Differences From Artifact [187685081a]:
- File
utils/ofhttp/ProgressBar.h
— part of check-in
[d74f244ab7]
at
2020-08-12 20:56:32
on branch trunk
— Avoid using (u)intmax_t in methods
It is not guaranteed that a type encoding for it exists. (user: js, size: 1221) [annotate] [blame] [check-ins using] [more...]
To Artifact [8f755a0177]:
- File utils/ofhttp/ProgressBar.h — part of check-in [7da1f47ece] at 2020-12-19 21:52:33 on branch trunk — ofhttp: Support for non-Unicode console output (user: js, size: 1301) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
@class OFDate;
@class OFTimer;
#define BPS_WINDOW_SIZE 10
@interface ProgressBar: OFObject
{
unsigned long long _received, _lastReceived, _length, _resumedFrom;
OFDate *_startDate, *_lastReceivedDate;
OFTimer *_drawTimer, *_BPSTimer;
bool _stopped;
float _BPS;
double _ETA;
float _BPSWindow[BPS_WINDOW_SIZE];
size_t _BPSWindowIndex, _BPSWindowLength;
}
- (instancetype)initWithLength: (unsigned long long)length
| > | > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
@class OFDate;
@class OFTimer;
#define BPS_WINDOW_SIZE 10
@interface ProgressBar: OFObject
{
bool _useUnicode;
unsigned long long _received, _lastReceived, _length, _resumedFrom;
OFDate *_startDate, *_lastReceivedDate;
OFTimer *_drawTimer, *_BPSTimer;
bool _stopped;
float _BPS;
double _ETA;
float _BPSWindow[BPS_WINDOW_SIZE];
size_t _BPSWindowIndex, _BPSWindowLength;
}
- (instancetype)initWithLength: (unsigned long long)length
resumedFrom: (unsigned long long)resumedFrom
useUnicode: (bool)useUnicode OF_DESIGNATED_INITIALIZER;
- (void)setReceived: (unsigned long long)received;
- (void)draw;
- (void)calculateBPSAndETA;
- (void)stop;
@end
|