pkarashchenko commented on a change in pull request #1066:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/1066#discussion_r827932933



##########
File path: system/ping/ping.c
##########
@@ -217,8 +238,25 @@ static void ping_result(FAR const struct ping_result_s 
*result)
                    result->nrequests;
 
             printf("%u packets transmitted, %u received, %u%% packet loss, "
-                   "time %d ms\n",
-                   result->nrequests, result->nreplies, tmp, result->extra);
+                   "time %ld ms\n",
+                   result->nrequests, result->nreplies, tmp,
+                   result->extra / USEC_PER_MSEC);
+            if (result->nreplies > 0)
+              {
+                long avg = priv->tsum / result->nreplies;
+                long long tempnum = priv->tsum2 / result->nreplies -
+                                    (long long)avg * avg;
+                long tmdev = ub16toi(ub32sqrtub16(uitoub32(tempnum)));

Review comment:
       great that you switched to int math




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to