Skip to content

Commit

Permalink
Switch PhysicsTimer
Browse files Browse the repository at this point in the history
PhysicsTimer.CurrentTime evalulated the stopwatch every single call.

This simply redirects the timer to use the master Timers.PortalYearTicks timer
  • Loading branch information
Mag-nus committed Feb 13, 2024
1 parent 39592f2 commit d4f62be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/ACE.Server/Physics/Common/PhysicsTimer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Diagnostics;

using ACE.Server.Entity;

namespace ACE.Server.Physics.Common
{
/// <summary>
Expand All @@ -10,11 +12,14 @@ public class PhysicsTimer
{
private static readonly Stopwatch _timer;

/*
/// <summary>
/// This should only be used by the ACE.Server.Physics namespace and physics related properties<para />
/// For a equally precise timer outside of this namespace, you can use WorldManager.PortalYearTicks
/// </summary>
public static double CurrentTime => _timer.Elapsed.TotalSeconds;
*/
public static double CurrentTime => Timers.PortalYearTicks;

static PhysicsTimer()
{
Expand Down

0 comments on commit d4f62be

Please sign in to comment.