mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 23:08:26 -04:00
[ui] use GNU wget's algorithms for rate/ETA display
This commit is contained in:
parent
4c816a519e
commit
38ba8d366c
4 changed files with 215 additions and 29 deletions
22
src/ui.h
22
src/ui.h
|
@ -47,10 +47,30 @@
|
|||
enum update_progress_type {
|
||||
UPT_PERCENT = 0,
|
||||
UPT_SPEED,
|
||||
UPT_TIME,
|
||||
UPT_ETA,
|
||||
UPT_MAX
|
||||
};
|
||||
|
||||
// Size of the download speed history ring.
|
||||
#define SPEED_HISTORY_SIZE 20
|
||||
|
||||
// The minimum time length of a history sample. By default, each sample is at least 150ms long,
|
||||
// which means that, over the course of 20 samples, "current" download speed spans at least 3s
|
||||
// into the past.
|
||||
#define SPEED_SAMPLE_MIN 150
|
||||
|
||||
// The time after which the download starts to be considered "stalled", i.e. the current
|
||||
// bandwidth is not printed and the recent download speeds are scratched.
|
||||
#define STALL_START_TIME 5000
|
||||
|
||||
// Time between screen refreshes will not be shorter than this.
|
||||
// NB: In Rufus' case, "screen" means the text overlaid on the progress bar.
|
||||
#define SCREEN_REFRESH_INTERVAL 200
|
||||
|
||||
// Don't refresh the ETA too often to avoid jerkiness in predictions.
|
||||
// This allows ETA to change approximately once per second.
|
||||
#define ETA_REFRESH_INTERVAL 990
|
||||
|
||||
extern HWND hMultiToolbar, hSaveToolbar, hHashToolbar, hAdvancedDeviceToolbar, hAdvancedFormatToolbar;
|
||||
extern HFONT hInfoFont;
|
||||
extern UINT_PTR UM_LANGUAGE_MENU_MAX;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue