未验证 提交 44cded35 编写于 作者: T Theodor Zoulias 提交者: GitHub

PeriodicTimer XML documentation improvement (#71905)

* PeriodicTimer XML documentation improvement

Improved the XML documentation text for the ArgumentOutOfRangeException that can be thrown when the period is less than 1 millisecond. The current text states that values greater than 0 are valid, which is not true for real numbers between 0.0 and 1.0.

* Update src/libraries/System.Private.CoreLib/src/System/Threading/PeriodicTimer.cs
Co-authored-by: NStephen Toub <stoub@microsoft.com>
上级 60af631f
......@@ -23,7 +23,7 @@ public sealed class PeriodicTimer : IDisposable
/// <summary>Initializes the timer.</summary>
/// <param name="period">The time interval between invocations of callback..</param>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="period"/> must be represent a number of milliseconds larger than 0 and smaller than <see cref="uint.MaxValue"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="period"/> must represent a number of milliseconds equal to or larger than 1, and smaller than <see cref="uint.MaxValue"/>.</exception>
public PeriodicTimer(TimeSpan period)
{
long ms = (long)period.TotalMilliseconds;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册