}
+# format_time_short_exact()
+#
+# format a time in seconds into a human readable short output
+#
+# parameter:
+# - time in seconds
+# return:
+# - formatted text
+sub format_time_short_exact {
+ my $time = shift;
+
+ my @return = ();
+
+ my $days = int($time / (24 * 60 * 60));
+ $time -= $days * (24 * 60 * 60);
+
+ my $hours = int($time / (60 * 60));
+ $time -= $hours * (60 * 60);
+
+ my $minutes = int($time / 60);
+ $time -= $minutes * 60;
+
+ my $seconds = $time;
+
+ if ($days > 0) {
+ push(@return, $days . 'd');
+ }
+ if ($hours > 0) {
+ push(@return, $hours . 'h');
+ }
+ if ($minutes > 0) {
+ push(@return, $minutes . 'm');
+ }
+ if ($seconds > 0) {
+ push(@return, $seconds . 's');
+ }
+
+ my $return = join(" ", @return);
+ if (length($return) == 0) {
+ $return = '0s';
+ }
+
+ return $return;
+}
+
+
+
+
# handle_command()
#
# wrapper to handle all commands