From f5a991c476c8745fb9d88c0c88ac34fedc5bb503 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Sun, 26 Jul 2015 12:16:25 +0200 Subject: [PATCH] shell: Fix statistic calculation in ping shell command --- sys/shell/commands/sc_icmpv6_echo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/shell/commands/sc_icmpv6_echo.c b/sys/shell/commands/sc_icmpv6_echo.c index 80cf8acd9b..eade2f8a4f 100644 --- a/sys/shell/commands/sc_icmpv6_echo.c +++ b/sys/shell/commands/sc_icmpv6_echo.c @@ -286,11 +286,11 @@ int _icmpv6_ping(int argc, char **argv) "%" PRIu32 ".%03" PRIu32 "/" "%" PRIu32 ".%03" PRIu32 "/" "%" PRIu32 ".%03" PRIu32 " ms\n", - (min_rtt.seconds * SEC_IN_MS) + (min_rtt.seconds / MS_IN_USEC), + (min_rtt.seconds * SEC_IN_MS) + (min_rtt.microseconds / MS_IN_USEC), min_rtt.microseconds % MS_IN_USEC, - (avg_rtt.seconds * SEC_IN_MS) + (avg_rtt.seconds / MS_IN_USEC), + (avg_rtt.seconds * SEC_IN_MS) + (avg_rtt.microseconds / MS_IN_USEC), avg_rtt.microseconds % MS_IN_USEC, - (max_rtt.seconds * SEC_IN_MS) + (max_rtt.seconds / MS_IN_USEC), + (max_rtt.seconds * SEC_IN_MS) + (max_rtt.microseconds / MS_IN_USEC), max_rtt.microseconds % MS_IN_USEC); } else {