nationstates-0.5.0.0: NationStates API client
NationStates.RateLimit
Description
Simple rate limiting combinator.
Synopsis
data RateLimit Source
newRateLimit Source
Arguments
Delay, in seconds
Create a new rate limiter with the specified delay.
The rate limiter is thread-safe, and can be shared between threads.
rateLimit :: RateLimit -> IO a -> IO a Source
Run the given action, pausing as necessary to keep under the rate limit.
setDelay :: Rational -> RateLimit -> RateLimit Source
Create a new rate limiter with the same lock but a different delay.