mirror of https://github.com/vitalif/grive2
Fix #108 :))
parent
04b86d1c87
commit
7bbb01c301
|
@ -47,10 +47,10 @@ void ProgressBar::reportProgress(u64_t total, u64_t processed)
|
||||||
processed = total;
|
processed = total;
|
||||||
double fraction = (double)processed/total;
|
double fraction = (double)processed/total;
|
||||||
|
|
||||||
int point = round(fraction*1000);
|
int point = fraction*1000;
|
||||||
if (this->last < 1000 || point != this->last)
|
if (this->last < 1000 || point != this->last)
|
||||||
{
|
{
|
||||||
// only print progress after >= 0.1% change
|
// do not print 100% progress multiple times (it will duplicate the progressbar)
|
||||||
this->last = point;
|
this->last = point;
|
||||||
|
|
||||||
// 10 for prefix of percent and 26 for suffix of file size
|
// 10 for prefix of percent and 26 for suffix of file size
|
||||||
|
|
Loading…
Reference in New Issue