diff options
author | Melanie | 2009-12-02 00:36:53 +0000 |
---|---|---|
committer | Melanie | 2009-12-02 00:36:53 +0000 |
commit | ded16d35299b068c03c9b241e54ea5e7e7942308 (patch) | |
tree | 56e164bf2b4c53f0285824210281708a160495c7 /OpenSim/Framework/Util.cs | |
parent | Enforce physical prim max size on single prims. (diff) | |
parent | * Test Autoconvert line ending on my repo.. (diff) | |
download | opensim-SC-ded16d35299b068c03c9b241e54ea5e7e7942308.zip opensim-SC-ded16d35299b068c03c9b241e54ea5e7e7942308.tar.gz opensim-SC-ded16d35299b068c03c9b241e54ea5e7e7942308.tar.bz2 opensim-SC-ded16d35299b068c03c9b241e54ea5e7e7942308.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 7b90239..b5e2872 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1389,30 +1389,30 @@ namespace OpenSim.Framework | |||
1389 | return null; | 1389 | return null; |
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | #endregion FireAndForget Threading Pattern | 1392 | #endregion FireAndForget Threading Pattern |
1393 | /// <summary> | 1393 | /// <summary> |
1394 | /// Environment.TickCount is an int but it counts all 32 bits so it goes positive | 1394 | /// Environment.TickCount is an int but it counts all 32 bits so it goes positive |
1395 | /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap | 1395 | /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap |
1396 | /// for the callers. | 1396 | /// for the callers. |
1397 | /// This trims it to a 12 day interval so don't let your frame time get too long. | 1397 | /// This trims it to a 12 day interval so don't let your frame time get too long. |
1398 | /// </summary> | 1398 | /// </summary> |
1399 | /// <returns></returns> | 1399 | /// <returns></returns> |
1400 | public static Int32 EnvironmentTickCount() | 1400 | public static Int32 EnvironmentTickCount() |
1401 | { | 1401 | { |
1402 | return Environment.TickCount & EnvironmentTickCountMask; | 1402 | return Environment.TickCount & EnvironmentTickCountMask; |
1403 | } | 1403 | } |
1404 | const Int32 EnvironmentTickCountMask = 0x3fffffff; | 1404 | const Int32 EnvironmentTickCountMask = 0x3fffffff; |
1405 | 1405 | ||
1406 | /// <summary> | 1406 | /// <summary> |
1407 | /// Environment.TickCount is an int but it counts all 32 bits so it goes positive | 1407 | /// Environment.TickCount is an int but it counts all 32 bits so it goes positive |
1408 | /// and negative every 24.9 days. Subtracts the passed value (previously fetched by | 1408 | /// and negative every 24.9 days. Subtracts the passed value (previously fetched by |
1409 | /// 'EnvironmentTickCount()') and accounts for any wrapping. | 1409 | /// 'EnvironmentTickCount()') and accounts for any wrapping. |
1410 | /// </summary> | 1410 | /// </summary> |
1411 | /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | 1411 | /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> |
1412 | public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) | 1412 | public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) |
1413 | { | 1413 | { |
1414 | Int32 diff = EnvironmentTickCount() - prevValue; | 1414 | Int32 diff = EnvironmentTickCount() - prevValue; |
1415 | return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); | 1415 | return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); |
1416 | } | 1416 | } |
1417 | } | 1417 | } |
1418 | } | 1418 | } |