Skip to content

Commit 1225849

Browse files
authored
Correctly reference UtcNow instead of Now
Doco is misleading indicating that when the timer does not use high res it returns DateTime.Now but looking at source code I can see that in fact it returns DateTime.UtcNow, so changed the documentation to reflect this small detail.
1 parent 2f1a330 commit 1225849

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Diagnostics/Stopwatch.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
<format type="text/markdown"><![CDATA[
436436
437437
## Remarks
438-
If the <xref:System.Diagnostics.Stopwatch> class uses a high-resolution performance counter, <xref:System.Diagnostics.Stopwatch.GetTimestamp%2A> returns the current value of that counter. If the <xref:System.Diagnostics.Stopwatch> class uses the system timer, <xref:System.Diagnostics.Stopwatch.GetTimestamp%2A> returns the current <xref:System.DateTime.Ticks%2A?displayProperty=nameWithType> property of the <xref:System.DateTime.Now%2A?displayProperty=nameWithType> instance.
438+
If the <xref:System.Diagnostics.Stopwatch> class uses a high-resolution performance counter, <xref:System.Diagnostics.Stopwatch.GetTimestamp%2A> returns the current value of that counter. If the <xref:System.Diagnostics.Stopwatch> class uses the system timer, <xref:System.Diagnostics.Stopwatch.GetTimestamp%2A> returns the current <xref:System.DateTime.Ticks%2A?displayProperty=nameWithType> property of the <xref:System.DateTime.UtcNow%2A?displayProperty=nameWithType> instance.
439439
440440
441441

0 commit comments

Comments
 (0)