Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs')
-rw-r--r--Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs b/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs
new file mode 100644
index 0000000..04a4040
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Internal/StopwatchImpl.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if !NO_STOPWATCH
+using System.Diagnostics;
+
+namespace System.Reactive.Concurrency
+{
+ //
+ // WARNING: This code is kept *identically* in two places. One copy is kept in System.Reactive.Core for non-PLIB platforms.
+ // Another copy is kept in System.Reactive.PlatformServices to enlighten the default lowest common denominator
+ // behavior of Rx for PLIB when used on a more capable platform.
+ //
+ internal class /*Default*/StopwatchImpl : IStopwatch
+ {
+ private readonly Stopwatch _sw;
+
+ public StopwatchImpl()
+ {
+ _sw = Stopwatch.StartNew();
+ }
+
+ public TimeSpan Elapsed
+ {
+ get { return _sw.Elapsed; }
+ }
+ }
+}
+#endif \ No newline at end of file