Currently, Timeout is defined as std::optional<unsigned> which is confusing, as it does not convey what the timeout unit is. Only by digging deeper into the code one finds a comment that internally milliseconds are used.
We can make it more self-explanatory and type-safe by changing the type to std::optional<std::chrono::milliseconds>.
Currently,
Timeoutis defined asstd::optional<unsigned>which is confusing, as it does not convey what the timeout unit is. Only by digging deeper into the code one finds a comment that internally milliseconds are used.We can make it more self-explanatory and type-safe by changing the type to
std::optional<std::chrono::milliseconds>.