From 1171a886929f8aaae2c598c35334a6301e8f0e0e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 27 Jun 2016 12:49:32 +0200 Subject: [PATCH] src/oping.c: Fix calculation of fractional time. It's "ns", not "us", stoopid! --- src/oping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.30.2