* Fix Inconsistent line ending style in Util

mysql-performance
Teravus Ovares (Dan Olivares) 2009-12-01 10:21:22 -05:00
parent d4073d9bd5
commit 4af77e84b1
1 changed files with 24 additions and 24 deletions

View File

@ -1389,30 +1389,30 @@ namespace OpenSim.Framework
return null; return null;
} }
#endregion FireAndForget Threading Pattern #endregion FireAndForget Threading Pattern
/// <summary> /// <summary>
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
/// and negative every 24.9 days. This trims down TickCount so it doesn't wrap /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
/// for the callers. /// for the callers.
/// This trims it to a 12 day interval so don't let your frame time get too long. /// This trims it to a 12 day interval so don't let your frame time get too long.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static Int32 EnvironmentTickCount() public static Int32 EnvironmentTickCount()
{ {
return Environment.TickCount & EnvironmentTickCountMask; return Environment.TickCount & EnvironmentTickCountMask;
} }
const Int32 EnvironmentTickCountMask = 0x3fffffff; const Int32 EnvironmentTickCountMask = 0x3fffffff;
/// <summary> /// <summary>
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
/// and negative every 24.9 days. Subtracts the passed value (previously fetched by /// and negative every 24.9 days. Subtracts the passed value (previously fetched by
/// 'EnvironmentTickCount()') and accounts for any wrapping. /// 'EnvironmentTickCount()') and accounts for any wrapping.
/// </summary> /// </summary>
/// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
{ {
Int32 diff = EnvironmentTickCount() - prevValue; Int32 diff = EnvironmentTickCount() - prevValue;
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
} }
} }
} }