--- smsdaemon/common.cpp 2008/06/10 14:38:59 35 +++ smsdaemon/common.cpp 2008/06/10 15:34:19 36 @@ -95,3 +95,19 @@ if (! ( isDaemon || isDebug)) printUsage(); } + + +std::string Common::getStatusMessage() +{ + long int now = time(0); + + long int diff = now - this->daemonStart; + + + std::ostringstream out; + out << "Uptime " << diff << " seconds. "; + out << "Messages received:" << this->smsCounter.incomming << ". "; + out << "Messages sent:" << this->smsCounter.outgoing << "."; + + return out.str(); +}