Parent Directory | Revision Log | Patch
revision 26 by torben, Mon Jun 9 18:15:53 2008 UTC | revision 55 by torben, Wed Jun 11 14:25:08 2008 UTC | |
---|---|---|
# | Line 8 | Line 8 |
8 | #include <time.h> | #include <time.h> |
9 | ||
10 | using namespace std; | using namespace std; |
11 | char* Months[] = { "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov","Dec"}; | const char* Months[] = { "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov","Dec"}; |
12 | ||
13 | Common* Common::instance() | Common* Common::instance() |
14 | { | { |
# | Line 95 void Common::loadConfig(int argc, char* | Line 95 void Common::loadConfig(int argc, char* |
95 | if (! ( isDaemon || isDebug)) | if (! ( isDaemon || isDebug)) |
96 | printUsage(); | printUsage(); |
97 | } | } |
98 | ||
99 | ||
100 | std::string Common::getStatusMessage() | |
101 | { | |
102 | long int now = time(0); | |
103 | ||
104 | long int diff = now - this->daemonStart; | |
105 | ||
106 | ||
107 | std::ostringstream out; | |
108 | out << "Uptime " << diff << " seconds. "; | |
109 | out << "Messages received:" << this->smsCounter.incomming << ". "; | |
110 | out << "Messages sent:" << this->smsCounter.outgoing << "."; | |
111 | ||
112 | return out.str(); | |
113 | } |
|
ViewVC Help | |
Powered by ViewVC 1.1.20 |