OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
/// <summary>
/// Remove a given number of tokens from the bucket
/// </summary>
/// <param name="amount">Number of tokens to remove from the bucket</param>
/// <returns>True if the requested number of tokens were removed from
/// the bucket, otherwise false</returns>
Remove a given number of tokens from the bucket
Remove a given number of tokens from the bucket
public bool RemoveTokens(Int64 amount)
        {
            Drip();
            if (m_tokenCount - amount >= 0)
            {
                m_tokenCount -= amount;
                return true;
            }
            return false;
        }
public bool RemoveTokens ( Int64 amount ) { Drip ( ) ; if ( m_tokenCount - amount >= 0 ) { m_tokenCount -= amount ; return true ; } return false ; }
Remove a given number of tokens from the bucket
Remove a given number of tokens from the bucket
// Deposit tokens for this interval // If we have enough tokens then remove them and return // we don't have to remove from the parent, the drip rate is already // reflective of the drip rate limits in the parent
True if the requested number of tokens were removed from
the bucket, otherwise false
True if the requested number of tokens were removed from the bucket otherwise false
amount
Int64
Number of tokens to remove from the bucket
Number of tokens to remove from the bucket