Under Desk Bike

    Show / Hide Table of Contents

    Class ScheduledTimer

    A timer that fires at a particular time of day.

    Inheritance
    object
    ScheduledTimer
    Implements
    IDisposable
    Namespace: Codaris.Common
    Assembly: Codaris.Common.dll
    Syntax
    public class ScheduledTimer : IDisposable

    Constructors

    ScheduledTimer(int, int, int)

    Initializes a new instance of the ScheduledTimer class. This timer will trigger at the specified time of day.

    public ScheduledTimer(int hour, int minute, int second)
    Parameters
    Type Name Description
    int hour

    The hour.

    int minute

    The minute.

    int second

    The second.

    See Also
    IDisposable

    Properties

    AutoReset

    Gets or sets a value indicating whether this instance should raise the Elapsed event only once (false) or repeatedly (true).

    public bool AutoReset { get; set; }
    Property Type
    bool
    See Also
    IDisposable

    Enabled

    Gets or sets a value indicating whether this ScheduledTimer should raise the Elapsed event.

    public bool Enabled { get; set; }
    Property Type
    bool
    See Also
    IDisposable

    Methods

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    public void Dispose()
    See Also
    IDisposable

    Dispose(bool)

    Releases unmanaged and - optionally - managed resources.

    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    See Also
    IDisposable

    Start()

    Starts raising theElapsed event by setting Enabled to true.

    public void Start()
    See Also
    IDisposable

    Stop()

    Stops raising the SElapsed event by setting Enabled to false.

    public void Stop()
    See Also
    IDisposable

    Events

    Elapsed

    Occurs when timer has elapsed.

    public event ElapsedEventHandler Elapsed
    Event Type
    ElapsedEventHandler
    See Also
    IDisposable

    Implements

    IDisposable

    See Also

    IDisposable
    Back to top Copyright (c) 2021 by Wayne Venables