DelayedMethod

public sealed class DelayedMethod

Constructors

DelayedMethod

#
public DelayedMethod(Action action, TimeSpan delay, int consecutiveKickLimit = 2147483647, bool startImmediately = true)
Create a new delayed method.
action (Action)Method to invoke.
delay (TimeSpan)Delay before invoking the method.
consecutiveKickLimit (int = 2147483647)Maximum number of times this method can be re-delayed.
startImmediately (bool = true)If true, the method schedule is started immediately.

DelayedMethod

#
public DelayedMethod(Action action)
Create a new delayed method.
action (Action)Method to invoke.

Properties

Delay

#
public TimeSpan Delay { get; }
Gets the delay this method operates under.

Methods

Kick

#
public void Kick()
Either delay a currently delayed invoke, or restart the wait from scratch.

Stop

#
public void Stop()
Stop the waiting process.