Table of Contents

Method Schedule

Namespace
Anvil.Services
Assembly
NWN.Anvil.dll

Schedule(Action, TimeSpan)

Schedules the specified action to be invoked after the given delay.

public ScheduledTask Schedule(Action action, TimeSpan delay)

Parameters

action Action

The task/action to run.

delay TimeSpan

The delay until the task is run.

Returns

ScheduledTask

A disposable object representing the scheduled task. Calling Dispose() will prevent the schedule from running.

Exceptions

ArgumentOutOfRangeException

Thrown if the delay is less than 0.

ArgumentNullException

Thrown if no action is specified.