diff options
author | Melanie | 2012-03-20 23:39:02 +0000 |
---|---|---|
committer | Melanie | 2012-03-20 23:39:02 +0000 |
commit | 35c3124c3badfc7c6e3b0ee1957cb827be678650 (patch) | |
tree | e245c0080da5acc0b9192208d0a421be865ba2cb /OpenSim/Framework/Util.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Add prim name to "[MESH]: No recognized physics mesh..." log message (diff) | |
download | opensim-SC-35c3124c3badfc7c6e3b0ee1957cb827be678650.zip opensim-SC-35c3124c3badfc7c6e3b0ee1957cb827be678650.tar.gz opensim-SC-35c3124c3badfc7c6e3b0ee1957cb827be678650.tar.bz2 opensim-SC-35c3124c3badfc7c6e3b0ee1957cb827be678650.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index a695542..d89bb3a 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1770,13 +1770,26 @@ namespace OpenSim.Framework | |||
1770 | /// and negative every 24.9 days. Subtracts the passed value (previously fetched by | 1770 | /// and negative every 24.9 days. Subtracts the passed value (previously fetched by |
1771 | /// 'EnvironmentTickCount()') and accounts for any wrapping. | 1771 | /// 'EnvironmentTickCount()') and accounts for any wrapping. |
1772 | /// </summary> | 1772 | /// </summary> |
1773 | /// <param name="newValue"></param> | ||
1774 | /// <param name="prevValue"></param> | ||
1773 | /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | 1775 | /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> |
1774 | public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) | 1776 | public static Int32 EnvironmentTickCountSubtract(Int32 newValue, Int32 prevValue) |
1775 | { | 1777 | { |
1776 | Int32 diff = EnvironmentTickCount() - prevValue; | 1778 | Int32 diff = newValue - prevValue; |
1777 | return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); | 1779 | return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); |
1778 | } | 1780 | } |
1779 | 1781 | ||
1782 | /// <summary> | ||
1783 | /// Environment.TickCount is an int but it counts all 32 bits so it goes positive | ||
1784 | /// and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
1785 | /// 'EnvironmentTickCount()') and accounts for any wrapping. | ||
1786 | /// </summary> | ||
1787 | /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | ||
1788 | public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) | ||
1789 | { | ||
1790 | return EnvironmentTickCountSubtract(EnvironmentTickCount(), prevValue); | ||
1791 | } | ||
1792 | |||
1780 | // Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount | 1793 | // Returns value of Tick Count A - TickCount B accounting for wrapping of TickCount |
1781 | // Assumes both tcA and tcB came from previous calls to Util.EnvironmentTickCount(). | 1794 | // Assumes both tcA and tcB came from previous calls to Util.EnvironmentTickCount(). |
1782 | // A positive return value indicates A occured later than B | 1795 | // A positive return value indicates A occured later than B |