--- smsdaemon/plugins/StatusPlugin.cpp 2008/06/16 16:41:18 101 +++ smsdaemon/plugins/StatusPlugin.cpp 2008/12/07 15:51:02 142 @@ -18,9 +18,12 @@ Common* cmn = Common::instance(); - int sec = time(0) - cmn->daemonStart; - int min = sec / 60; - int hour = min / 60; + int tot_sec = time(0) - cmn->daemonStart; + + int sec = tot_sec % 60; + int min = (tot_sec / 60) % 60; + int hour = (tot_sec / 3600) %24; + int days = tot_sec / (3600*24); std::ostringstream os; os << VERSION << std::endl; @@ -28,9 +31,9 @@ os << "Status:" << std::endl; os << "Recv: " << cmn->smsCounter.incomming << std::endl; os << "Send: " << cmn->smsCounter.outgoing << std::endl; - os << "Uptime: " << hour << ":" << min << ":" << sec; + os << "Uptime: " << days << "d, " << hour << ":" << min << ":" << sec; - modem.SendSms(sms.sender, os.str(), true ); + modem.SendSms(sms.GetSender(), os.str(), true ); }