Skip to content

Commit b46fac8

Browse files
docs: clearer description of the converged clock test
1 parent 0abd90c commit b46fac8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎com.unity.netcode.gameobjects/Tests/Editor/Timing/ClientNetworkTimeSystemTests.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public void RttCatchupSlowdownTest()
139139
}
140140

141141
/// <summary>
142-
/// Tests that once the clock reaches the offset it is adjusting towards, it advances at the real rate on every
143-
/// frame instead of alternating between faster and slower.
142+
/// Validates that once the clock has caught up with a time sync, its local and server time both advance by
143+
/// exactly the frame's delta time on every frame, instead of alternating between slightly fast and slightly slow.
144144
/// </summary>
145145
[Test]
146146
public void ConvergedClockAdvancesAtRealRate([Values(0.01d, 0.1d)] double adjustmentRatio)
@@ -149,7 +149,7 @@ public void ConvergedClockAdvancesAtRealRate([Values(0.01d, 0.1d)] double adjust
149149
double receivedServerTime = 2;
150150
var timeSystem = new NetworkTimeSystem(0.05d, 0.05d, 0.1d, adjustmentRatio);
151151
timeSystem.Reset(receivedServerTime, 0.1d);
152-
// Moves the desired offset, within the hard reset threshold, so the clock has to adjust to it first.
152+
// A sync 10 ms ahead, below the hard reset threshold, makes the clock catch up gradually instead of resetting.
153153
receivedServerTime += 0.01d;
154154
timeSystem.Sync(receivedServerTime, 0.1d);
155155

0 commit comments

Comments
 (0)