Commit da3256b5 authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

Update the uptime string to include an hours indicator

Before, it wasn't really obvious if one meant hours:minutes or
minutes:seconds etc.
parent d696bd1b
...@@ -39,13 +39,15 @@ secs_to_uptime(long secs) ...@@ -39,13 +39,15 @@ secs_to_uptime(long secs)
switch (days) { switch (days) {
case 0: case 0:
tor_asprintf(&uptime_string, "%d:%02d", hours, minutes); tor_asprintf(&uptime_string, "%d:%02d hours", hours, minutes);
break; break;
case 1: case 1:
tor_asprintf(&uptime_string, "%ld day %d:%02d", days, hours, minutes); tor_asprintf(&uptime_string, "%ld day %d:%02d hours",
days, hours, minutes);
break; break;
default: default:
tor_asprintf(&uptime_string, "%ld days %d:%02d", days, hours, minutes); tor_asprintf(&uptime_string, "%ld days %d:%02d hours",
days, hours, minutes);
break; break;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment