diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:59:06 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:59:06 +0200 |
commit | 4046be06720932a57a0f49416b0144b2858824d0 (patch) | |
tree | 678c37cab05960f48923a23bb46d9e01be89d35a /library/statistics.cpp | |
parent | 1.19 (diff) | |
download | FreeFileSync-4046be06720932a57a0f49416b0144b2858824d0.tar.gz FreeFileSync-4046be06720932a57a0f49416b0144b2858824d0.tar.bz2 FreeFileSync-4046be06720932a57a0f49416b0144b2858824d0.zip |
2.0
Diffstat (limited to 'library/statistics.cpp')
-rw-r--r-- | library/statistics.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/library/statistics.cpp b/library/statistics.cpp index ec03c59e..f2506da8 100644 --- a/library/statistics.cpp +++ b/library/statistics.cpp @@ -5,6 +5,11 @@ #include "statusHandler.h" #include "../algorithm.h" #include <limits> +#include <wx/stopwatch.h> + + +RetrieveStatistics::RetrieveStatistics() : + timer(new wxStopWatch) {} RetrieveStatistics::~RetrieveStatistics() @@ -30,7 +35,7 @@ void RetrieveStatistics::writeEntry(const double value, const int objects) statEntry newEntry; newEntry.value = value; newEntry.objects = objects; - newEntry.time = timer.Time(); + newEntry.time = timer->Time(); data.push_back(newEntry); } @@ -102,8 +107,8 @@ Statistics::Statistics(const int totalObjectCount, windowSizeRemTime(windowSizeRemainingTime), windowSizeBPS(windowSizeBytesPerSecond), windowMax(std::max(windowSizeRemainingTime, windowSizeBytesPerSecond)), - remainingTimeLast(256*256*256*100) //something "big" -{} + remainingTimeLast(256*256*256*100), //something "big" + timer(new wxStopWatch) {} void Statistics::addMeasurement(const int objectsCurrent, const double dataCurrent) @@ -111,7 +116,7 @@ void Statistics::addMeasurement(const int objectsCurrent, const double dataCurre record newEntry; newEntry.objects = objectsCurrent; newEntry.data = dataCurrent; - newEntry.time = timer.Time(); + newEntry.time = timer->Time(); //insert new record measurements.push_back(newEntry); @@ -176,13 +181,13 @@ wxString Statistics::getBytesPerSecond() const void Statistics::pauseTimer() { - timer.Pause(); + timer->Pause(); } void Statistics::resumeTimer() { - timer.Resume(); + timer->Resume(); } /* |