fixed the issue #19 Issues with the ping time measurement

This commit is contained in:
Volker Fischer 2016-02-07 14:02:30 +00:00
parent 01bdb9b5f4
commit 8e33e34350
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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
}
};