+string format_time(float seconds)
+{
+ float days, hours, minutes;
+ seconds = floor(seconds + 0.5);
+ days = floor(seconds / 864000);
+ seconds -= days * 864000;
+ hours = floor(seconds / 36000);
+ seconds -= hours * 36000;
+ minutes = floor(seconds / 600);
+ seconds -= minutes * 600;
+ if (days > 0)
+ return sprintf(_("%d days, %02d:%02d:%02d"), days, hours, minutes, seconds);
+ else
+ return sprintf(_("%02d:%02d:%02d"), hours, minutes, seconds);
+}
+