Renamed _start

This commit is contained in:
Daniel Marjamäki 2018-06-16 22:43:25 +02:00
parent ce78245f38
commit 0e8a60f1ad
2 changed files with 4 additions and 4 deletions

View File

@ -74,12 +74,12 @@ void TimerResults::AddResults(const std::string& str, std::clock_t clocks)
Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults) Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults)
: _str(str) : _str(str)
, mTimerResults(timerResults) , mTimerResults(timerResults)
, _start(0) , mStart(0)
, mShowTimeMode(showtimeMode) , mShowTimeMode(showtimeMode)
, mStopped(false) , mStopped(false)
{ {
if (showtimeMode != SHOWTIME_NONE) if (showtimeMode != SHOWTIME_NONE)
_start = std::clock(); mStart = std::clock();
} }
Timer::~Timer() Timer::~Timer()
@ -91,7 +91,7 @@ void Timer::Stop()
{ {
if ((mShowTimeMode != SHOWTIME_NONE) && !mStopped) { if ((mShowTimeMode != SHOWTIME_NONE) && !mStopped) {
const std::clock_t end = std::clock(); const std::clock_t end = std::clock();
const std::clock_t diff = end - _start; const std::clock_t diff = end - mStart;
if (mShowTimeMode == SHOWTIME_FILE) { if (mShowTimeMode == SHOWTIME_FILE) {
const double sec = (double)diff / CLOCKS_PER_SEC; const double sec = (double)diff / CLOCKS_PER_SEC;

View File

@ -79,7 +79,7 @@ private:
const std::string _str; const std::string _str;
TimerResultsIntf* mTimerResults; TimerResultsIntf* mTimerResults;
std::clock_t _start; std::clock_t mStart;
const unsigned int mShowTimeMode; const unsigned int mShowTimeMode;
bool mStopped; bool mStopped;
}; };