Commit 456eb1f8 by Amaury Johnen

with progressMeter instead of StatusBar

parent 5bf8ba92
Showing with 17 additions and 5 deletions
......@@ -1563,8 +1563,19 @@ int Msg::GetThreadNum(){ return 0; }
MsgProgressStatus::MsgProgressStatus(int num)
: totalElementToTreat_(num), currentI_(0), nextIToCheck_(0),
initialTime_(Cpu()), lastTime_(initialTime_), lastPercentage_(0)
initialTime_(Cpu()), lastTime_(initialTime_), lastPercentage_(0),
Msg::ProgressMeter(totalElementToTreat_, totalElementToTreat_, true, "done");
void MsgProgressStatus::next()
......@@ -1583,13 +1594,13 @@ void MsgProgressStatus::next()
const double remaining = (currentTime-initialTime_) / (currentI_+1) *
(totalElementToTreat_ - currentI_-1);
if (remaining < 60*2)
Msg::StatusBar(true, "%d%% (remaining time ~%g seconds)",
Msg::ProgressMeter(currentI_, totalElementToTreat_, true, "%d%% (remaining time ~%g seconds)",
currentPercentage, remaining);
else if (remaining < 60*60*2)
Msg::StatusBar(true, "%d%% (remaining time ~%g minutes)",
Msg::ProgressMeter(currentI_, totalElementToTreat_, true, "%d%% (remaining time ~%g minutes)",
currentPercentage, remaining/60);
Msg::StatusBar(true, "%d%% (remaining time ~%g hours)",
Msg::ProgressMeter(currentI_, totalElementToTreat_, true, "%d%% (remaining time ~%g hours)",
currentPercentage, remaining/3600);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment