From 4cd49d7eca5f8fd53eb98577a1f218a5086704bb Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Apr 2021 01:38:43 +0100 Subject: Fix sending incorrect date values on world change Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge. --- src/DeadlockDetect.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/DeadlockDetect.h') diff --git a/src/DeadlockDetect.h b/src/DeadlockDetect.h index 98ce13df3..0016313ba 100644 --- a/src/DeadlockDetect.h +++ b/src/DeadlockDetect.h @@ -46,7 +46,7 @@ protected: struct sWorldAge { /** Last m_WorldAge that has been detected in this world */ - Int64 m_Age; + cTickTimeLong m_Age; /** Number of cycles for which the age has been the same */ int m_NumCyclesSame; @@ -71,16 +71,16 @@ protected: // cIsThread overrides: virtual void Execute(void) override; - /** Sets the initial world age */ - void SetWorldAge(const AString & a_WorldName, Int64 a_Age); + /** Sets the initial world age. */ + void SetWorldAge(const AString & a_WorldName, cTickTimeLong a_Age); - /** Checks if the world's age has changed, updates the world's stats; calls DeadlockDetected() if deadlock detected */ - void CheckWorldAge(const AString & a_WorldName, Int64 a_Age); + /** Checks if the world's age has changed, updates the world's stats; calls DeadlockDetected() if deadlock detected. */ + void CheckWorldAge(const AString & a_WorldName, cTickTimeLong a_Age); /** Called when a deadlock is detected in a world. Aborts the server. a_WorldName is the name of the world whose age has triggered the detection. a_WorldAge is the age (in ticks) in which the world is stuck. */ - [[noreturn]] void DeadlockDetected(const AString & a_WorldName, Int64 a_WorldAge); + [[noreturn]] void DeadlockDetected(const AString & a_WorldName, cTickTimeLong a_WorldAge); /** Outputs a listing of the tracked CSs, together with their name and state. */ void ListTrackedCSs(); -- cgit v1.2.3