C# Class Hardly.Throttle

Show file Open project: hardlydifficult/HardlyBot Class Usage Examples

Public Methods

Method Description
ExecuteIfReady ( ulong key ) : bool
SleepTillReady ( ulong key ) : void
Throttle ( TimeSpan timeBetweenActions ) : System
TimeRemaining ( ulong key ) : TimeSpan

Private Methods

Method Description
TimeToSleepFor ( ulong key ) : int

Method Details

ExecuteIfReady() public method

public ExecuteIfReady ( ulong key ) : bool
key ulong
return bool

SleepTillReady() public method

public SleepTillReady ( ulong key ) : void
key ulong
return void

Throttle() public method

public Throttle ( TimeSpan timeBetweenActions ) : System
timeBetweenActions TimeSpan
return System

TimeRemaining() public method

public TimeRemaining ( ulong key ) : TimeSpan
key ulong
return TimeSpan