using System;
using System.Threading;
using System.Threading.Tasks;
namespace RateLimiter
{
///
/// Represents a time constraints that can be awaited
///
public interface IAwaitableConstraint
{
///
/// returns a task that will complete once the constraint is fulfilled
///
///
/// Cancel the wait
///
///
/// A disposable that should be disposed upon task completion
///
Task WaitForReadiness(CancellationToken cancellationToken);
///
/// Returns a new IAwaitableConstraint with same constraints but unused
///
///
IAwaitableConstraint Clone();
}
}