We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67a71be commit 6c036caCopy full SHA for 6c036ca
lib/timer.cpp
@@ -140,6 +140,6 @@ std::string TimerResultsData::durationToString(std::chrono::milliseconds duratio
140
std::string secondsStr{std::to_string(seconds.count())};
141
auto pos = secondsStr.find_first_of('.');
142
if (pos != std::string::npos && (pos + 4) < secondsStr.size())
143
- secondsStr = secondsStr.substr(0, pos + 4); // keep three decimal
+ secondsStr.resize(pos + 4); // keep three decimal
144
return (ellapsedTime + secondsStr + "s");
145
}
0 commit comments