Прочетете на английски Редактиране

Споделяне чрез


PeriodicTimer.Period Property

Definition

Gets or sets the period between ticks.

C#
public TimeSpan Period { get; set; }

Property Value

Exceptions

value must be InfiniteTimeSpan or represent a number of milliseconds equal to or larger than 1 and smaller than MaxValue.

Remarks

All prior ticks of the timer, including any that may be waiting to be consumed by WaitForNextTickAsync(CancellationToken), are unaffected by changes to Period. Setting Period affects only and all subsequent times at which the timer will tick.

Applies to

Продукт Версии
.NET 8, 9, 10