`round` -> `myround`
Remove superflous `floor` calls
if (m_shutdown_timer > 0.0f) {
std::wstringstream ws;
ws << L"*** Server shutting down in "
- << duration_to_string(round(m_shutdown_timer)).c_str() << ".";
+ << duration_to_string(myround(m_shutdown_timer)).c_str() << ".";
SendChatMessage(pkt->getPeerId(), ws.str());
}
}
std::wstringstream ws;
ws << L"*** Server shutting down in "
- << duration_to_string(round(m_shutdown_timer - dtime)).c_str()
+ << duration_to_string(myround(m_shutdown_timer - dtime)).c_str()
<< ".";
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
std::wstringstream ws;
ws << L"*** Server shutting down in "
- << duration_to_string(round(m_shutdown_timer)).c_str()
+ << duration_to_string(myround(m_shutdown_timer)).c_str()
<< ".";
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
inline const std::string duration_to_string(int sec)
{
- int min = floor(sec / 60);
+ int min = sec / 60;
sec %= 60;
- int hour = floor(min / 60);
+ int hour = min / 60;
min %= 60;
std::stringstream ss;