Skip to content

Commit 5abc1ad

Browse files
author
Julius R Friedman
authored
Update Timer.xml for consistency (#4496)
* Update Timer.xml for consistency int and long use the terms milliseconds and values (0) or (-1) where as `TimeSpan` overload reference `System.TimeSpan.Zero` or `Timeout.Infinite`. * Update Timer.xml Fixed a few typos * Update Timer.xml Fixed a few typos * Update Timer.xml Ooops * Update Timer.xml few more places I missed * Update Timer.xml oops * Update Timer.xml oops * Update Timer.xml double wording * Update Timer.xml Reverted 247-248. Other suggestions hopefully done correctly this time. * Update Timer.xml Yea I saw ghost :p * Update Timer.xml Never saw the sequel https://www.imdb.com/title/tt2623408/ * Update Timer.xml Could I waste any more of his time...
1 parent 017d92e commit 5abc1ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xml/System.Threading/Timer.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ Sub TimerCallback(state As Object)
386386
<Docs>
387387
<param name="callback">A delegate representing a method to be executed.</param>
388388
<param name="state">An object containing information to be used by the callback method, or <see langword="null" />.</param>
389-
<param name="dueTime">The amount of time to delay before the <paramref name="callback" /> parameter invokes its methods. Specify negative one (-1) milliseconds to prevent the timer from starting. Specify zero (0) to start the timer immediately.</param>
390-
<param name="period">The time interval between invocations of the methods referenced by <paramref name="callback" />. Specify negative one (-1) milliseconds to disable periodic signaling.</param>
389+
<param name="dueTime">The amount of time to delay before the <paramref name="callback" /> is invoked. Specify <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to prevent the timer from starting. Specify <see cref="F:System.TimeSpan.Zero" /> to start the timer immediately.</param>
390+
<param name="period">The time interval between invocations of <paramref name="callback" />. Specify <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to disable periodic signaling.</param>
391391
<summary>Initializes a new instance of the <see langword="Timer" /> class, using <see cref="T:System.TimeSpan" /> values to measure time intervals.</summary>
392392
<remarks>
393393
<format type="text/markdown"><![CDATA[
@@ -716,8 +716,8 @@ Sub TimerCallback(state As Object)
716716
<Parameter Name="period" Type="System.TimeSpan" />
717717
</Parameters>
718718
<Docs>
719-
<param name="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.Timer" /> was constructed. Specify negative one (-1) milliseconds to prevent the timer from restarting. Specify zero (0) to restart the timer immediately.</param>
720-
<param name="period">The time interval between invocations of the callback method specified when the <see cref="T:System.Threading.Timer" /> was constructed. Specify negative one (-1) milliseconds to disable periodic signaling.</param>
719+
<param name="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.Timer" /> 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.</param>
720+
<param name="period">The time interval between invocations of the callback method specified when the <see cref="T:System.Threading.Timer" /> was constructed. Specify <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to disable periodic signaling.</param>
721721
<summary>Changes the start time and the interval between method invocations for a timer, using <see cref="T:System.TimeSpan" /> values to measure time intervals.</summary>
722722
<returns>
723723
<see langword="true" /> if the timer was successfully updated; otherwise, <see langword="false" />.</returns>
@@ -727,9 +727,9 @@ Sub TimerCallback(state As Object)
727727
## Remarks
728728
The callback method is invoked once after `dueTime` elapses, and thereafter each time the time interval specified by `period` elapses.
729729
730-
If `dueTime` is zero (0), the callback method is invoked immediately. If `dueTime` is negative one (-1) milliseconds, the callback method is never invoked; the timer is disabled, but can be re-enabled by calling <xref:System.Threading.Timer.Change%2A> and specifying a positive value for `dueTime`.
730+
If `dueTime` is <xref cref="F:System.TimeSpan.Zero?displayProperty=nameWithType" />, the callback method is invoked immediately. If `dueTime` is <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />, the callback method is never invoked; the timer is disabled, but can be re-enabled by calling <xref:System.Threading.Timer.Change%2A> and specifying a positive value for `dueTime`.
731731
732-
If `period` is zero (0) or negative one (-1) milliseconds, and `dueTime` is positive, the callback method is invoked once; the periodic behavior of the timer is disabled, but can be re-enabled by calling <xref:System.Threading.Timer.Change%2A> and specifying a value greater than zero for `period`.
732+
If `period` is <xref cref="F:System.TimeSpan.Zero?displayProperty=nameWithType" /> or <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />, and `dueTime` is positive, the callback method is invoked once; the periodic behavior of the timer is disabled, but can be re-enabled by calling <xref:System.Threading.Timer.Change%2A> and specifying a value greater than zero for `period`.
733733
734734
The <xref:System.Threading.Timer.Change%2A> method can be called from the <xref:System.Threading.TimerCallback> delegate.
735735

0 commit comments

Comments
 (0)