aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorDan Lake2011-04-29 15:49:49 -0700
committerDan Lake2011-04-29 15:49:49 -0700
commit8f14c3f04f6f4ddeafdfc83c1719ec5cddfe7dfe (patch)
treebe718fbb3ab2e404b5cb650d544eec86abb0bb42 /OpenSim/Framework/Util.cs
parentFix crash when [Mesh] section is missing from configuration files (diff)
parentMinor correction to yesterday's changes. Make normal prim crossing (no attach... (diff)
downloadopensim-SC_OLD-8f14c3f04f6f4ddeafdfc83c1719ec5cddfe7dfe.zip
opensim-SC_OLD-8f14c3f04f6f4ddeafdfc83c1719ec5cddfe7dfe.tar.gz
opensim-SC_OLD-8f14c3f04f6f4ddeafdfc83c1719ec5cddfe7dfe.tar.bz2
opensim-SC_OLD-8f14c3f04f6f4ddeafdfc83c1719ec5cddfe7dfe.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/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>