MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ShowUptime

Function ShowUptime

daemon/HTTPServer.cpp:110–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 }
109
110 static void ShowUptime (std::stringstream& s, int seconds)
111 {
112 int num;
113
114 if ((num = seconds / 86400) > 0) {
115 s << ntr("%d day", "%d days", num, num) << ", ";
116 seconds -= num * 86400;
117 }
118 if ((num = seconds / 3600) > 0) {
119 s << ntr("%d hour", "%d hours", num, num) << ", ";
120 seconds -= num * 3600;
121 }
122 if ((num = seconds / 60) > 0) {
123 s << ntr("%d minute", "%d minutes", num, num) << ", ";
124 seconds -= num * 60;
125 }
126 s << ntr("%d second", "%d seconds", seconds, seconds);
127 }
128
129 static void ShowTraffic (std::stringstream& s, uint64_t bytes)
130 {

Callers 1

ShowStatusFunction · 0.70

Calls 1

ntrFunction · 0.85

Tested by

no test coverage detected