1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #3497 from tfar/tm/2015/07/fix_ping_stats

Fix statistic calculation in ping shell command
This commit is contained in:
Martine Lenders 2015-07-26 16:28:38 +02:00
commit 4efdb99597

View File

@ -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 {