summaryrefslogtreecommitdiff
path: root/lib/perf_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/perf_check.cpp')
-rw-r--r--lib/perf_check.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/perf_check.cpp b/lib/perf_check.cpp
index c6a4e2d1..85a98910 100644
--- a/lib/perf_check.cpp
+++ b/lib/perf_check.cpp
@@ -98,34 +98,13 @@ wxString PerfCheck::getBytesPerSecond() const
const double timeDelta = recordBack.first - recordFront.first;
const double dataDelta = recordBack.second.data_ - recordFront.second.data_;
- if (!numeric::isNull(timeDelta))
- if (dataDelta > 0) //may be negative if user cancels copying
+ if (!numeric::isNull(timeDelta) && dataDelta > 0)
return filesizeToShortString(zen::Int64(dataDelta * 1000 / timeDelta)) + _("/sec");
}
return L"-"; //fallback
}
-wxString PerfCheck::getOverallBytesPerSecond() const //for all samples
-{
- warn_static("WTF!? tihs considers window only!")
-
- if (!samples.empty())
- {
- const auto& recordBack = *samples.rbegin();
- const auto& recordFront = *samples.begin();
- //-----------------------------------------------------------------------------------------------
- const double timeDelta = recordBack.first - recordFront.first;
- const double dataDelta = recordBack.second.data_ - recordFront.second.data_;
-
- if (!numeric::isNull(timeDelta))
- if (dataDelta > 0) //may be negative if user cancels copying
- return zen::filesizeToShortString(zen::Int64(dataDelta * 1000 / timeDelta)) + _("/sec");
- }
- return L"-"; //fallback
-}
-
-
/*
class for calculation of remaining time:
----------------------------------------
bgstack15