From 2d4ccd6e20a4106f08959301c991e22f54e013fb Mon Sep 17 00:00:00 2001 From: John Cote Date: Fri, 3 Jan 2020 00:07:09 -0500 Subject: [PATCH] Revert "ai: perhaps fix serverTime" This reverts commit 2c8d90ca093971328ac98369db0c8ae61262c1d0. --- otp/ai/TimeManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/otp/ai/TimeManager.py b/otp/ai/TimeManager.py index d487d2b..bbafe96 100644 --- a/otp/ai/TimeManager.py +++ b/otp/ai/TimeManager.py @@ -128,8 +128,8 @@ class TimeManager(DistributedObject.DistributedObject): self.attemptCount += 1 self.notify.info('Clock sync roundtrip took %0.3f ms' % (elapsed * 1000.0)) self.notify.info('AI time delta is %s from server delta' % PythonUtil.formatElapsedSeconds(aiTimeSkew)) - average = (self.start + end) // 2.0 - self.extraSkew - uncertainty = (end - self.start) // 2.0 + abs(self.extraSkew) + average = (self.start + end) / 2.0 - self.extraSkew + uncertainty = (end - self.start) / 2.0 + abs(self.extraSkew) globalClockDelta.resynchronize(average, timestamp, uncertainty) self.notify.info('Local clock uncertainty +/- %.3f s' % globalClockDelta.getUncertainty()) if globalClockDelta.getUncertainty() > self.maxUncertainty: