From 79e166e9aaf56b6798e27201962f6e109925c697 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 19 Jun 2017 05:22:38 +0100 Subject: revert EnvironmentTick back to orignal clock, since change may cause issues on some code paths. Clean a bit get mesh and get texture throttle --- OpenSim/Framework/Util.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Util.cs') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index a855767..af14939 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -2967,9 +2967,9 @@ namespace OpenSim.Framework /// public static Int32 EnvironmentTickCount() { - double now = GetTimeStampMS(); - return (int)now; + return Environment.TickCount & EnvironmentTickCountMask; } + const Int32 EnvironmentTickCountMask = 0x3fffffff; /// @@ -2994,8 +2994,7 @@ namespace OpenSim.Framework /// subtraction of passed prevValue from current Environment.TickCount public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) { - double now = GetTimeStampMS(); - return EnvironmentTickCountSubtract((int)now, prevValue); + return EnvironmentTickCountSubtract(EnvironmentTickCount(), prevValue); } // Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount -- cgit v1.1