Renamed _clocks
This commit is contained in:
parent
94c7e28835
commit
4f34a5145f
|
@ -54,7 +54,7 @@ void TimerResults::ShowResults(SHOWTIME_MODES mode) const
|
|||
for (std::vector<dataElementType>::const_iterator iter=data.begin() ; iter!=data.end(); ++iter) {
|
||||
const double sec = iter->second.seconds();
|
||||
const double secAverage = sec / (double)(iter->second.mNumberOfResults);
|
||||
overallData._clocks += iter->second._clocks;
|
||||
overallData.mClocks += iter->second.mClocks;
|
||||
if ((mode != SHOWTIME_TOP5) || (ordinal<=5)) {
|
||||
std::cout << iter->first << ": " << sec << "s (avg. " << secAverage << "s - " << iter->second.mNumberOfResults << " result(s))" << std::endl;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void TimerResults::ShowResults(SHOWTIME_MODES mode) const
|
|||
|
||||
void TimerResults::AddResults(const std::string& str, std::clock_t clocks)
|
||||
{
|
||||
_results[str]._clocks += clocks;
|
||||
_results[str].mClocks += clocks;
|
||||
_results[str].mNumberOfResults++;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@ public:
|
|||
};
|
||||
|
||||
struct TimerResultsData {
|
||||
std::clock_t _clocks;
|
||||
std::clock_t mClocks;
|
||||
long mNumberOfResults;
|
||||
|
||||
TimerResultsData()
|
||||
: _clocks(0)
|
||||
: mClocks(0)
|
||||
, mNumberOfResults(0) {
|
||||
}
|
||||
|
||||
double seconds() const {
|
||||
const double ret = (double)((unsigned long)_clocks) / (double)CLOCKS_PER_SEC;
|
||||
const double ret = (double)((unsigned long)mClocks) / (double)CLOCKS_PER_SEC;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue