C# Класс GSF.Threading.EventTimer

A reoccurring timer that fires on a given interval. This event timer will always fire at the top of the specified interval. If the callback takes too long, the next interval will be skipped.
Наследование: GSF.Diagnostics.DisposableLoggingClassBase
Показать файл Открыть проект

Открытые методы

Метод Описание
ChangeTimer ( System.TimeSpan period, System.TimeSpan dayOffset = default(TimeSpan) ) : void

Modifies the timer. Note, it takes some time for this timer to go into effect.

Create ( System.TimeSpan period, System.TimeSpan dayOffset = default(TimeSpan) ) : EventTimer

Creates a EventTimer on the specified interval.

CreateHours ( double periodInHours, double dayOffsetInHours ) : EventTimer

Creates a EventTimer on the specified interval.

CreateMinutes ( double periodInMinutes, double dayOffsetInMinutes ) : EventTimer

Creates a EventTimer on the specified interval.

CreateSeconds ( double periodInSecond, double dayOffsetInSecond ) : EventTimer

Creates a EventTimer on the specified interval.

EventTimer ( System.TimeSpan period, System.TimeSpan dayOffset ) : System

Creates a EventTimer

RestartTimer ( ) : void
RunNow ( ) : void

Immediately executes the timer, not waiting for the elapsed interval.

Start ( ThreadingMode mode = ThreadingMode.ThreadPool ) : void

Starts the watching

TimerRunning ( object sender, EventArgs e ) : void

This timer will reliably fire the directory polling every interval.

Приватные методы

Метод Описание
Dispose ( bool disposing ) : void

Описание методов

ChangeTimer() публичный Метод

Modifies the timer. Note, it takes some time for this timer to go into effect.
public ChangeTimer ( System.TimeSpan period, System.TimeSpan dayOffset = default(TimeSpan) ) : void
period System.TimeSpan
dayOffset System.TimeSpan
Результат void

Create() публичный статический Метод

Creates a EventTimer on the specified interval.
public static Create ( System.TimeSpan period, System.TimeSpan dayOffset = default(TimeSpan) ) : EventTimer
period System.TimeSpan How often the time will reset
dayOffset System.TimeSpan The offset as represented in UTC time when the event should fire
Результат EventTimer

CreateHours() публичный статический Метод

Creates a EventTimer on the specified interval.
public static CreateHours ( double periodInHours, double dayOffsetInHours ) : EventTimer
periodInHours double How often the time will reset
dayOffsetInHours double The offset as represented in UTC time when the event should fire
Результат EventTimer

CreateMinutes() публичный статический Метод

Creates a EventTimer on the specified interval.
public static CreateMinutes ( double periodInMinutes, double dayOffsetInMinutes ) : EventTimer
periodInMinutes double How often the time will reset
dayOffsetInMinutes double The offset as represented in UTC time when the event should fire
Результат EventTimer

CreateSeconds() публичный статический Метод

Creates a EventTimer on the specified interval.
public static CreateSeconds ( double periodInSecond, double dayOffsetInSecond ) : EventTimer
periodInSecond double How often the time will reset
dayOffsetInSecond double The offset as represented in UTC time when the event should fire
Результат EventTimer

EventTimer() публичный Метод

Creates a EventTimer
public EventTimer ( System.TimeSpan period, System.TimeSpan dayOffset ) : System
period System.TimeSpan
dayOffset System.TimeSpan
Результат System

RestartTimer() публичный Метод

public RestartTimer ( ) : void
Результат void

RunNow() публичный Метод

Immediately executes the timer, not waiting for the elapsed interval.
public RunNow ( ) : void
Результат void

Start() публичный Метод

Starts the watching
public Start ( ThreadingMode mode = ThreadingMode.ThreadPool ) : void
mode ThreadingMode
Результат void

TimerRunning() публичный Метод

This timer will reliably fire the directory polling every interval.
public TimerRunning ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void