Debian Codegraph @

external/rx/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs

raw
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
3 #if !NO_STOPWATCH
4 using System.Diagnostics;
5
6 namespace System.Reactive.Concurrency
7 {
8 //
9 // WARNING: This code is kept *identically* in two places. One copy is kept in System.Reactive.Core for non-PLIB platforms.
10 // Another copy is kept in System.Reactive.PlatformServices to enlighten the default lowest common denominator
11 // behavior of Rx for PLIB when used on a more capable platform.
12 //
13 internal class /*Default*/StopwatchImpl : IStopwatch
14 {
15 private readonly Stopwatch _sw;
16
17 public StopwatchImpl()
18 {
19 _sw = Stopwatch.StartNew();
20 }
21
22 public TimeSpan Elapsed
23 {
24 get { return _sw.Elapsed; }
25 }
26 }
27 }
28 #endif