From b9b280abd1799bca3919b688dc8f77597a64bc2c Mon Sep 17 00:00:00 2001 From: jean pellotier Date: Wed, 24 Jan 2018 23:29:41 +0100 Subject: [PATCH] a new clock following real time pace, for mp protocol the current timestamp used in mp protocol and in AImultiplayer is not a good one: it can pause, or even change speed if we change warp value. we want it to be used for network protocol lag and jitter estimation, and a time flowing linearly on both side is needed, here's a first introduction of this timestamp relates to real elapsed time. here it's initialised to the system clock, then follow the monotonic clock. in future improvement, it will allow time synchronisation betwen mp players, to have a very good close formation flight experience. --- src/AIModel/AIMultiplayer.cxx | 4 +++- src/MultiPlayer/multiplaymgr.cxx | 11 +++++++---- src/Time/TimeManager.cxx | 28 +++++++++++++++++++++++++--- src/Time/TimeManager.hxx | 5 +++++ 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/AIModel/AIMultiplayer.cxx b/src/AIModel/AIMultiplayer.cxx index 1dc7a0621..fa33266f5 100644 --- a/src/AIModel/AIMultiplayer.cxx +++ b/src/AIModel/AIMultiplayer.cxx @@ -30,6 +30,7 @@ #include
#include
+#include