@@ -41,7 +41,7 @@ internal static ClockTimerProvider CurrentProvider
4141 }
4242
4343 /// <summary>
44- /// Pins the specified date/time retuned to the current time until the disposable is disposed.
44+ /// Pins the specified date/time returned to the current time until the disposable is disposed.
4545 /// </summary>
4646 /// <param name="elapsed">The date and time to the clock.</param>
4747 /// <returns>The disposer that manages the lifetime of the scoped pinned value.</returns>
@@ -144,35 +144,35 @@ public static ClockTimer StartNew()
144144 /// <summary>
145145 /// Gets the total elapsed time measured by the current instance.
146146 /// </summary>
147- public TimeSpan Elapsed => stopwatch ? . Elapsed ?? stopwatchInterface . Elapsed ;
147+ public TimeSpan Elapsed => this . stopwatch ? . Elapsed ?? this . stopwatchInterface . Elapsed ;
148148
149149 /// <summary>
150150 /// Gets the total elapsed time measured by the current instance, in milliseconds.
151151 /// </summary>
152- public long ElapsedMilliseconds => stopwatch ? . ElapsedMilliseconds ?? stopwatchInterface . ElapsedMilliseconds ;
152+ public long ElapsedMilliseconds => this . stopwatch ? . ElapsedMilliseconds ?? this . stopwatchInterface . ElapsedMilliseconds ;
153153
154154 /// <summary>
155155 /// Gets the total elapsed time measured by the current instance, in timer ticks.
156156 /// </summary>
157- public long ElapsedTicks => stopwatch ? . ElapsedTicks ?? stopwatchInterface . ElapsedTicks ;
157+ public long ElapsedTicks => this . stopwatch ? . ElapsedTicks ?? this . stopwatchInterface . ElapsedTicks ;
158158
159159 /// <summary>
160160 /// Gets a value indicating whether the <see cref="ClockTimer"/> timer is running.
161161 /// </summary>
162- public bool IsRunning => stopwatch ? . IsRunning ?? stopwatchInterface . IsRunning ;
162+ public bool IsRunning => this . stopwatch ? . IsRunning ?? this . stopwatchInterface . IsRunning ;
163163
164164 /// <summary>
165165 /// Stops time interval measurement and resets the elapsed time to zero.
166166 /// </summary>
167167 public void Reset ( )
168168 {
169- if ( stopwatch is object )
169+ if ( this . stopwatch is object )
170170 {
171- stopwatch . Reset ( ) ;
171+ this . stopwatch . Reset ( ) ;
172172 }
173173 else
174174 {
175- stopwatchInterface . Reset ( ) ;
175+ this . stopwatchInterface . Reset ( ) ;
176176 }
177177 }
178178
@@ -181,13 +181,13 @@ public void Reset()
181181 /// </summary>
182182 public void Restart ( )
183183 {
184- if ( stopwatch is object )
184+ if ( this . stopwatch is object )
185185 {
186- stopwatch . Restart ( ) ;
186+ this . stopwatch . Restart ( ) ;
187187 }
188188 else
189189 {
190- stopwatchInterface . Restart ( ) ;
190+ this . stopwatchInterface . Restart ( ) ;
191191 }
192192 }
193193
@@ -196,13 +196,13 @@ public void Restart()
196196 /// </summary>
197197 public void Start ( )
198198 {
199- if ( stopwatch is object )
199+ if ( this . stopwatch is object )
200200 {
201- stopwatch . Start ( ) ;
201+ this . stopwatch . Start ( ) ;
202202 }
203203 else
204204 {
205- stopwatchInterface . Start ( ) ;
205+ this . stopwatchInterface . Start ( ) ;
206206 }
207207 }
208208
@@ -211,76 +211,59 @@ public void Start()
211211 /// </summary>
212212 public void Stop ( )
213213 {
214- if ( stopwatch is object )
214+ if ( this . stopwatch is object )
215215 {
216- stopwatch . Stop ( ) ;
216+ this . stopwatch . Stop ( ) ;
217217 }
218218 else
219219 {
220- stopwatchInterface . Stop ( ) ;
220+ this . stopwatchInterface . Stop ( ) ;
221221 }
222222 }
223223
224224 /// <summary>
225- /// Interface representing the concretet implmentaion of a ClockTimer.
225+ /// Interface representing a concrete implementation of a ClockTimer.
226226 /// </summary>
227227 public interface IPinnedClockTimer
228228 {
229- //
230- // Summary:
231- // Gets the total elapsed time measured by the current instance.
232- //
233- // Returns:
234- // A read-only System.TimeSpan representing the total elapsed time measured by the
235- // current instance.
229+ /// <summary>
230+ /// Gets the total elapsed time measured by the current instance.
231+ /// </summary>
236232 public TimeSpan Elapsed { get ; }
237233
238- //
239- // Summary:
240- // Gets the total elapsed time measured by the current instance, in milliseconds.
241- //
242- // Returns:
243- // A read-only long integer representing the total number of milliseconds measured
244- // by the current instance.
234+ /// <summary>
235+ /// Gets the total elapsed time measured by the current instance, in milliseconds.
236+ /// </summary>
245237 public long ElapsedMilliseconds { get ; }
246238
247- //
248- // Summary:
249- // Gets the total elapsed time measured by the current instance, in timer ticks.
250- //
251- // Returns:
252- // A read-only long integer representing the total number of timer ticks measured
253- // by the current instance.
239+ /// <summary>
240+ /// Gets the total elapsed time measured by the current instance, in timer ticks.
241+ /// </summary>
254242 public long ElapsedTicks { get ; }
255243
256- //
257- // Summary:
258- // Gets a value indicating whether the System.Diagnostics.Stopwatch timer is running.
259- //
260- // Returns:
261- // true if the System.Diagnostics.Stopwatch instance is currently running and measuring
262- // elapsed time for an interval; otherwise, false.
244+ /// <summary>
245+ /// Gets a value indicating whether the System.Diagnostics.Stopwatch timer is running.
246+ /// </summary>
263247 public bool IsRunning { get ; }
264248
265- //
266- // Summary:
267- // Stops time interval measurement and resets the elapsed time to zero.
249+ /// <summary>
250+ /// Stops time interval measurement and resets the elapsed time to zero.
251+ /// </summary>
268252 public void Reset ( ) ;
269253
270- //
271- // Summary:
272- // Stops time interval measurement, resets the elapsed time to zero, and starts
273- // measuring elapsed time.
254+ /// <summary>
255+ /// Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
256+ /// </summary>
274257 public void Restart ( ) ;
275258
276- //
277- // Summary:
278- // Starts, or resumes, measuring elapsed time for an interval.
259+ /// <summary>
260+ /// Starts, or resumes, measuring elapsed time for an interval.
261+ /// </summary>
279262 public void Start ( ) ;
280263
281- //
282- // Summary:
283- // Stops measuring elapsed time for an interval.
264+ /// <summary>
265+ /// Stops measuring elapsed time for an interval.
266+ /// </summary>
284267 public void Stop ( ) ;
285268 }
286269 }
0 commit comments