Skip to content

Commit 6c036ca

Browse files
committed
Nits
1 parent 67a71be commit 6c036ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ std::string TimerResultsData::durationToString(std::chrono::milliseconds duratio
140140
std::string secondsStr{std::to_string(seconds.count())};
141141
auto pos = secondsStr.find_first_of('.');
142142
if (pos != std::string::npos && (pos + 4) < secondsStr.size())
143-
secondsStr = secondsStr.substr(0, pos + 4); // keep three decimal
143+
secondsStr.resize(pos + 4); // keep three decimal
144144
return (ellapsedTime + secondsStr + "s");
145145
}

0 commit comments

Comments
 (0)