mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +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:
commit
4efdb99597
@ -286,11 +286,11 @@ int _icmpv6_ping(int argc, char **argv)
|
|||||||
"%" PRIu32 ".%03" PRIu32 "/"
|
"%" PRIu32 ".%03" PRIu32 "/"
|
||||||
"%" PRIu32 ".%03" PRIu32 "/"
|
"%" PRIu32 ".%03" PRIu32 "/"
|
||||||
"%" PRIu32 ".%03" PRIu32 " ms\n",
|
"%" 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,
|
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,
|
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);
|
max_rtt.microseconds % MS_IN_USEC);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user