aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorSean McNamara2011-05-02 02:23:18 -0400
committerSean McNamara2011-05-02 02:23:18 -0400
commitfffd42f5cbbb9e59b6fde3247aeb0d80d990319f (patch)
tree034b3e8da351954bc1124d91ec1f28e29e6a68c6 /OpenSim/Framework/Util.cs
parentFirst pass at fixing justincc's feedback v2 ( http://opensimulator.org/mantis... (diff)
parentFixed confusing OSDMap that comes as the response of QueryAccess in the case ... (diff)
downloadopensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.zip
opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.gz
opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.bz2
opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.xz
Merge git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 5a5046e..aaa2724 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1537,6 +1537,23 @@ namespace OpenSim.Framework
1537 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); 1537 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
1538 } 1538 }
1539 1539
1540 // Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount
1541 // Assumes both tcA and tcB came from previous calls to Util.EnvironmentTickCount().
1542 // A positive return value indicates A occured later than B
1543 public static Int32 EnvironmentTickCountCompare(Int32 tcA, Int32 tcB)
1544 {
1545 // A, B and TC are all between 0 and 0x3fffffff
1546 int tc = EnvironmentTickCount();
1547
1548 if (tc - tcA >= 0)
1549 tcA += EnvironmentTickCountMask + 1;
1550
1551 if (tc - tcB >= 0)
1552 tcB += EnvironmentTickCountMask + 1;
1553
1554 return tcA - tcB;
1555 }
1556
1540 /// <summary> 1557 /// <summary>
1541 /// Prints the call stack at any given point. Useful for debugging. 1558 /// Prints the call stack at any given point. Useful for debugging.
1542 /// </summary> 1559 /// </summary>