153 uint32_t seconds = millis() / 1000UL;
154 uint32_t minutes = seconds / 60UL;
155 uint32_t hours = minutes / 60UL;
156 uint8_t days = hours / 24UL;
163 strncpy_P(buffer, PSTR(
"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n"), 45);
164 _client.print(buffer);
165 strncpy_P(buffer, PSTR(
"Connection: close\r\n\n<!DOCTYPE HTML>\n<html>\n"), 45);
166 _client.print(buffer);
167 strncpy_P(buffer, PSTR(
"<head><style>body{background-color:linen;}\n"), 45);
168 _client.print(buffer);
169 strncpy_P(buffer, PSTR(
"td{border: 1px solid black;}</style></head>\n"), 45);
170 _client.print(buffer);
171 strncpy_P(buffer, PSTR(
"<body><table><tr><td> Uptime</td><td>\n"), 45);
172 _client.print(buffer);
173 sprintf_P(buffer, PSTR(
"%u days, %lu hours %lu minutes %lu"), days, hours, minutes, seconds);
174 _client.print(buffer);
175 strncpy_P(buffer, PSTR(
"seconds</td></tr><tr><td>UIP Buffer Size"), 45);
176 _client.print(buffer);
177 sprintf_P(buffer, PSTR(
"</td><td>%u bytes</td></tr><tr><td>User "), UIP_BUFSIZE);
178 _client.print(buffer);
179 sprintf_P(buffer, PSTR(
"Output<br>Buffer Size</td><td>%u bytes"),
OUTPUT_BUFFER_SIZE);
180 _client.print(buffer);
181 strncpy_P(buffer, PSTR(
"</td></tr></table><br><br>"), 45);
182 _client.print(buffer);
183 strncpy_P(buffer, PSTR(
"<a href='/'>Home</a></body></html>"), 45);
184 _client.print(buffer);