mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::util: Limit iteration.
This commit is contained in:
parent
e39a0807a2
commit
a2541e3627
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ ircd::util::pretty_nanoseconds(const mutable_buffer &out,
|
||||||
|
|
||||||
size_t i(0), pos(0);
|
size_t i(0), pos(0);
|
||||||
long double val(ns);
|
long double val(ns);
|
||||||
for(; val > std::get<1>(unit.at(pos)); ++pos)
|
for(; val > std::get<1>(unit.at(pos)) && pos < unit.size() - 1; ++pos)
|
||||||
val /= std::get<1>(unit.at(pos));
|
val /= std::get<1>(unit.at(pos));
|
||||||
|
|
||||||
return fmt::sprintf
|
return fmt::sprintf
|
||||||
|
|
Loading…
Reference in a new issue