From: Florian Forster Date: Mon, 27 Jun 2016 10:49:32 +0000 (+0200) Subject: src/oping.c: Fix calculation of fractional time. X-Git-Url: https://git.tokkee.org/?p=liboping.git;a=commitdiff_plain;h=1171a886929f8aaae2c598c35334a6301e8f0e0e src/oping.c: Fix calculation of fractional time. It's "ns", not "us", stoopid! --- diff --git a/src/oping.c b/src/oping.c index 94515c2..e3bbffc 100644 --- a/src/oping.c +++ b/src/oping.c @@ -1606,7 +1606,7 @@ static void update_host_hook (pingobj_iter_t *iter, /* {{{ */ if (clock_gettime (CLOCK_REALTIME, &ts) == 0) { - double t = ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1000000.0); + double t = ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1000000000.0); if ((sequence % 32) == 0) fprintf (outfile, "#time,host,latency[ms]\n");