Skip to content

Commit

Permalink
Merge pull request #3278 from haukepetersen/fix_sc_pin_percentage
Browse files Browse the repository at this point in the history
sys/shell: fixed percentage calc of ping6 shell cmd
  • Loading branch information
OlegHahm committed Jun 30, 2015
2 parents 0b3b0c7 + b803438 commit 3651f5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/shell/commands/sc_icmpv6_echo.c
Expand Up @@ -220,7 +220,8 @@ int _icmpv6_ping(int argc, char **argv)
if (success > 0) {
timex_normalize(&sum_rtt);
printf("%d packets transmitted, %d received, %d%% packet loss, time %"
PRIu32 ".06%" PRIu32 " s\n", n, success, (success - n) / n,
PRIu32 ".06%" PRIu32 " s\n", n, success,
(100 - ((success * 100) / n)),
sum_rtt.seconds, sum_rtt.microseconds);
timex_t avg_rtt = timex_from_uint64(timex_uint64(sum_rtt) / n); /* get average */
printf("rtt min/avg/max = "
Expand Down

0 comments on commit 3651f5f

Please sign in to comment.