Skip to content
Snippets Groups Projects
Commit 4efdb995 authored by Martine Lenders's avatar Martine Lenders
Browse files

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

Fix statistic calculation in ping shell command
parents cdbb1303 f5a991c4
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment