Display uptime in days, not hours.

This commit is contained in:
lotodore
2007-11-30 21:29:42 +00:00
parent b97c56cd26
commit c76f6eaa91
+2 -2
View File
@@ -111,11 +111,11 @@ ServerManager::SignalIrcChatMsg(const std::string &nickName, const std::string &
else if (command == "stat")
{
ServerStats tmpStats = GetLobbyThread().GetStats();
boost::posix_time::ptime curTime(boost::posix_time::second_clock::local_time());
{
boost::posix_time::time_duration timeDiff(boost::posix_time::second_clock::local_time() - GetLobbyThread().GetStartTime());
ostringstream statStream;
statStream
<< "Server uptime................ " << curTime - GetLobbyThread().GetStartTime();
<< "Server uptime................ " << timeDiff.hours() / 24 << " days " << timeDiff.hours() % 24 << " hours " << timeDiff.minutes() << " minutes " << timeDiff.seconds() << " seconds";
m_ircThread->SendChatMessage(statStream.str());
}
{