Table of Contents

Class IntervalTimer

Namespace
CarrotMQ.Core.Common
Assembly
CarrotMQ.Core.dll

Timer that fires a recurring Elapsed event after a given interval. The interval restarts only after the event has been "processed". It is based on the System.Timers.Timer.

public sealed class IntervalTimer : IIntervalTimer, IDisposable
Inheritance
IntervalTimer
Implements
Inherited Members

Constructors

IntervalTimer(uint)

Initializes a new instance of the IntervalTimer class with the specified interval.

public IntervalTimer(uint intervalInMs)

Parameters

intervalInMs uint

The interval, in milliseconds, at which the timer elapses.

Methods

Dispose()

public void Dispose()

Start()

Starts the interval timer.

public void Start()

Stop()

Stops the interval timer.

public void Stop()

Events

ElapsedAsync

Occurs when the interval timer elapses.

public event AsyncEventHandler<IIntervalTimer.IntervalTimerElapsedEventArgs>? ElapsedAsync

Event Type

AsyncEventHandler<IIntervalTimer.IntervalTimerElapsedEventArgs>