mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
FileManager: Estimate transfer time
Use the total bytes transferred count to estimate the time left for the copy operation to finish. With the estimate label, the two progress bars were deemed superfluous, so the only remaining progress bar is the overall copy progress, that is updated more frequently. (The same progress is also shown in the task bar, so you can minimize the window and still be informed of the progress.)
This commit is contained in:
parent
8d25290198
commit
602f98fe67
3 changed files with 58 additions and 20 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace FileManager {
|
||||
|
@ -45,6 +46,9 @@ private:
|
|||
|
||||
void close_pipe();
|
||||
|
||||
String estimate_time(off_t bytes_done, off_t total_byte_count);
|
||||
Core::ElapsedTimer m_elapsed_timer;
|
||||
|
||||
RefPtr<Core::Notifier> m_notifier;
|
||||
RefPtr<Core::File> m_helper_pipe;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue