Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Threading.​ITimer

Assembly: System.Runtime

Represents a timer that can have its due time and period changed.

Methods

public bool
Change​(TimeSpan dueTime, TimeSpan period)
dueTime A <see cref="T:System.TimeSpan" /> representing the amount of time to delay before invoking the callback method specified when the <see cref="T:System.Threading.ITimer" /> was constructed. Specify <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to prevent the timer from restarting. Specify <see cref="F:System.TimeSpan.Zero" /> to restart the timer immediately.
period The time interval between invocations of the callback method specified when the Timer was constructed. Specify <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to disable periodic signaling.
Returns <see langword="true" /> if the timer was successfully updated; otherwise, <see langword="false" /> .
Changes the start time and the interval between method invocations for a timer, using <see cref="T:System.TimeSpan" /> values to measure time intervals.