| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
using System; |
| 4 |
|
| 5 |
namespace System.Reactive.Concurrency |
| 6 |
{ |
| 7 |
/* |
| 8 |
* The ability to request a stopwatch object has been introduced in Rx v2.0 to reduce the |
| 9 |
* number of allocations made by operators that use absolute time to compute relative time |
| 10 |
* diffs, such as TimeInterval and Delay. This causes a large number of related objects to |
| 11 |
* be allocated in the BCL, e.g. System.Globalization.DaylightTime. |
| 12 |
*/ |
| 13 |
|
| 14 |
/// <summary> |
| 15 |
/// Provider for IStopwatch objects. |
| 16 |
/// </summary> |
| 17 |
public interface IStopwatchProvider |
| 18 |
{ |
| 19 |
/// <summary> |
| 20 |
/// Starts a new stopwatch object. |
| 21 |
/// </summary> |
| 22 |
/// <returns>New stopwatch object; started at the time of the request.</returns> |
| 23 |
IStopwatch StartStopwatch(); |
| 24 |
} |
| 25 |
} |