Class WaitableTimer
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Class WaitableTimer emulates the Win32 WaitableTimer concept by using an internal timer setting an AutoResetEvent object.
It uses a periodic timer to avoid problems with time span calculations.
The period of the timer (which affects the resolution) is by default one second. This
can be changed with the parameterized constructor by setting the resolution parameter.
The precision of the timer (i e if it will signal on an even hour, minute, second etc)
can be set with the precision parameter.
Inheritance
System.Object
WaitableTimer
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Scheduler.Internal
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public class WaitableTimer : IDisposable
Constructors
WaitableTimer()
Declaration
public WaitableTimer()
WaitableTimer(TimerPrecision, Int64, Double)
Declaration
public WaitableTimer(TimerPrecision precision, long resolution, double minInterval)
Parameters
Type | Name | Description |
---|---|---|
TimerPrecision | precision | |
System.Int64 | resolution | |
System.Double | minInterval |
WaitableTimer(Int64)
Declaration
public WaitableTimer(long resolution)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | resolution |
Fields
DefaultResolution
Declaration
public static readonly long DefaultResolution
Field Value
Type | Description |
---|---|
System.Int64 |
MinInterval
Declaration
public static readonly double MinInterval
Field Value
Type | Description |
---|---|
System.Double |
Properties
DueTime
Declaration
public DateTime DueTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
Event
Declaration
public AutoResetEvent Event { get; }
Property Value
Type | Description |
---|---|
System.Threading.AutoResetEvent |
IsRunning
Declaration
public bool IsRunning { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Cancel()
Declaration
public void Cancel()
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Set(DateTime)
Declaration
public void Set(DateTime dueTime)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | dueTime |
Set(TimeSpan)
Declaration
public void Set(TimeSpan timeToWait)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeToWait |
StopIntervalTimer()
Declaration
protected void StopIntervalTimer()
Implements
System.IDisposable