Quellcode durchsuchen

Update the uptime string to include an hours indicator

Before, it wasn't really obvious if one meant hours:minutes or
minutes:seconds etc.
Sebastian Hahn vor 13 Jahren
Ursprung
Commit
da3256b5ae
1 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. 5 3
      src/or/status.c

+ 5 - 3
src/or/status.c

@@ -39,13 +39,15 @@ secs_to_uptime(long secs)
 
   switch (days) {
   case 0:
-    tor_asprintf(&uptime_string, "%d:%02d", hours, minutes);
+    tor_asprintf(&uptime_string, "%d:%02d hours", hours, minutes);
     break;
   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;
   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;
   }