Overview
Comment: | utils/ofhttp: Show ETA |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
65681d03424b1035bc31287de00bd569 |
User & Date: | js on 2015-05-16 23:59:39 |
Other Links: | manifest | tags |
Context
2015-05-17
| ||
01:42 | utils/ofhttp: Make sure bar width is >= 0 check-in: e4b34278f5 user: js tags: trunk | |
2015-05-16
| ||
23:59 | utils/ofhttp: Show ETA check-in: 65681d0342 user: js tags: trunk | |
20:29 | Rename OFDeflateStream -> OFInflateStream check-in: 2e9336b1ef user: js tags: trunk | |
Changes
Modified utils/ofhttp/ProgressBar.h from [41e4a8fdbc] to [88c7d2589b].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 | 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; |
Modified utils/ofhttp/ProgressBar.m from [54fb752c1d] to [258ce39ec5].
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + + | scheduledTimerWithTimeInterval: UPDATE_INTERVAL target: self selector: @selector(draw) repeats: true] retain]; _BPSTimer = [[OFTimer scheduledTimerWithTimeInterval: 1.0 target: self |
︙ | |||
87 88 89 90 91 92 93 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - + | uint_fast8_t i; float bars, percent; unsigned short barWidth; #ifdef HAVE_SYS_IOCTL_H struct winsize ws; if (ioctl(0, TIOCGWINSZ, &ws) == 0) |
︙ | |||
127 128 129 130 131 132 133 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - - + + + + + + + + + + + + + + + + | for (i = 0; i < barWidth - (uint_fast8_t)bars - 1; i++) [of_stdout writeString: @" "]; } [of_stdout writeFormat: @"▏ %6.2f%% ", percent]; |
︙ | |||
179 180 181 182 183 184 185 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | - + + | { if (_length > 0) [self _drawProgress]; else [self _drawReceived]; } |
︙ |