Display uptime in days, not hours.
This commit is contained in:
@@ -111,11 +111,11 @@ ServerManager::SignalIrcChatMsg(const std::string &nickName, const std::string &
|
|||||||
else if (command == "stat")
|
else if (command == "stat")
|
||||||
{
|
{
|
||||||
ServerStats tmpStats = GetLobbyThread().GetStats();
|
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;
|
ostringstream statStream;
|
||||||
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());
|
m_ircThread->SendChatMessage(statStream.str());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user