From 8e33e34350b1e912fb770e867ed454ff28b1e5a4 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 7 Feb 2016 14:02:30 +0000 Subject: [PATCH] fixed the issue #19 Issues with the ping time measurement --- ChangeLog | 2 ++ src/util.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4270d3e2..d2d4542f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ - avoid a single jitter buffer for the auto detection +- bug fix: ping time measurement may be invalid for the Linux OS + diff --git a/src/util.h b/src/util.h index 424783ba..5d9e80d6 100755 --- a/src/util.h +++ b/src/util.h @@ -1151,7 +1151,7 @@ public: #else timespec tp; clock_gettime ( CLOCK_MONOTONIC, &tp ); - return tp.tv_nsec / 1000000; // convert ns in ms + return tp.tv_sec * 1000 + tp.tv_nsec / 1000000; // convert ns in ms and add the seconds part #endif } };