Fix message when a command times out.

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

Change-Id: I10f6d7bf7b7a4647658313ed83781fda6fd744a5
This commit is contained in:
Christopher Ferris 2015-01-09 15:56:21 -08:00
parent 96e4409e8c
commit 67c5a8af9e
1 changed files with 1 additions and 1 deletions

View File

@ -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) {
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);
return -1;
}