Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d195f87b authored by Christopher Ferris's avatar Christopher Ferris
Browse files

Fix message when a command times out.

The previous version printed out the nanoseconds elapsed, not seconds.

Bug: 18766581

(cherry picked from commit 67c5a8af)

Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
parent 806f23de
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -360,7 +360,7 @@ int run_command(const char *title, int timeout_seconds, const char *command, ...
        }
        }


        if (timeout_seconds && elapsed / NANOS_PER_SEC > timeout_seconds) {
        if (timeout_seconds && elapsed / NANOS_PER_SEC > timeout_seconds) {
            printf("*** %s: Timed out after %ds (killing pid %d)\n", command, (int) elapsed, pid);
            printf("*** %s: Timed out after %.3fs (killing pid %d)\n", command, (float) elapsed / NANOS_PER_SEC, pid);
            kill(pid, SIGTERM);
            kill(pid, SIGTERM);
            return -1;
            return -1;
        }
        }