Show / Hide Table of Contents

    Class Timer

    Inheritance
    Object
    CancellationTokenSource
    Timer
    Implements
    IDisposable
    Inherited Members
    CancellationTokenSource.Cancel(Boolean)
    CancellationTokenSource.CancelAfter(Int32)
    CancellationTokenSource.CancelAfter(TimeSpan)
    CancellationTokenSource.CreateLinkedTokenSource(CancellationToken, CancellationToken)
    CancellationTokenSource.CreateLinkedTokenSource(CancellationToken[])
    CancellationTokenSource.Dispose()
    CancellationTokenSource.IsCancellationRequested
    CancellationTokenSource.Token
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: P42.Utils
    Assembly: P42.Utils.dll
    Syntax
    public sealed class Timer : CancellationTokenSource, IDisposable

    Constructors

    | Improve this Doc View Source

    Timer(TimerCallback, Object, TimeSpan, TimeSpan)

    Declaration
    public Timer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)
    Parameters
    Type Name Description
    TimerCallback callback
    Object state
    TimeSpan dueTime
    TimeSpan period

    Methods

    | Improve this Doc View Source

    Cancel()

    Declaration
    public void Cancel()
    | Improve this Doc View Source

    Change(Int64, Int64)

    Declaration
    public void Change(long dueTime = -1L, long period = -1L)
    Parameters
    Type Name Description
    Int64 dueTime
    Int64 period
    | Improve this Doc View Source

    Change(TimeSpan, TimeSpan)

    Declaration
    public void Change(TimeSpan dueTime, TimeSpan period)
    Parameters
    Type Name Description
    TimeSpan dueTime
    TimeSpan period
    | Improve this Doc View Source

    Change(UInt32, UInt32)

    Declaration
    public void Change(uint dueTime, uint period)
    Parameters
    Type Name Description
    UInt32 dueTime
    UInt32 period
    | Improve this Doc View Source

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing
    Overrides
    CancellationTokenSource.Dispose(Boolean)
    | Improve this Doc View Source

    StartTimer(TimeSpan, Func<Boolean>)

    Declaration
    public static void StartTimer(TimeSpan interval, Func<bool> callback)
    Parameters
    Type Name Description
    TimeSpan interval
    Func<Boolean> callback
    | Improve this Doc View Source

    StartTimer(TimeSpan, Func<Task<Boolean>>)

    Declaration
    public static void StartTimer(TimeSpan interval, Func<Task<bool>> callback)
    Parameters
    Type Name Description
    TimeSpan interval
    Func<Task<Boolean>> callback
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    Implements

    System.IDisposable

    Extension Methods

    DebugExtensions.AddToCensus(Object)
    DebugExtensions.RemoveFromCensus(Object)
    ReflectionExtensions.GetProperties(Object)
    ReflectionExtensions.GetProperty(Object, String)
    ReflectionExtensions.PropertyNames(Object)
    ReflectionExtensions.PropertyExists(Object, String)
    ReflectionExtensions.HasProperty(Object, String)
    ReflectionExtensions.GetPropertyValue(Object, String)
    ReflectionExtensions.SetPropertyValue(Object, String, Object)
    ReflectionExtensions.GetFieldValue(Object, String)
    ReflectionExtensions.SetFieldValue(Object, String, Object)
    ReflectionExtensions.CallMethod(Object, String, Object[])
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 42nd Parallel