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

StopwatchImpl.cs « Internal « Reactive « System.Reactive.PlatformServices « Rx.NET - github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 04a4040aa8580ba0337968aa8e806a77c2bf1f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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