summaryrefslogtreecommitdiffstats
path: root/cmds/dumpstate
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-01-09 15:56:21 -0800
committerChristopher Ferris <cferris@google.com>2015-01-14 16:10:11 -0800
commitd195f87b2dd4aa731a21ef3acd321e2441c5bffb (patch)
treec222e9dc269dc114393396f587d6c3c2565c2395 /cmds/dumpstate
parent806f23de71be2494cfabbe08d11c09606966a5d5 (diff)
downloadframeworks_native-d195f87b2dd4aa731a21ef3acd321e2441c5bffb.zip
frameworks_native-d195f87b2dd4aa731a21ef3acd321e2441c5bffb.tar.gz
frameworks_native-d195f87b2dd4aa731a21ef3acd321e2441c5bffb.tar.bz2
Fix message when a command times out.
The previous version printed out the nanoseconds elapsed, not seconds. Bug: 18766581 (cherry picked from commit 67c5a8af9ed128d8bb56d4723303aef6f0a4500f) Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
Diffstat (limited to 'cmds/dumpstate')
-rw-r--r--cmds/dumpstate/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index e3042eb..81cdd12 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -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;
}