Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ public void Sleep(TimeSpan timeout)

public IStopwatch StartStopwatch()
{
#if !NO_STOPWATCH
return new StopwatchImpl();
#else
return new DefaultStopwatch();
#endif
}

public bool SupportsLongRunning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ public void Sleep(TimeSpan timeout)

public IStopwatch StartStopwatch()
{
#if !NO_STOPWATCH
return new StopwatchImpl();
#else
return new DefaultStopwatch();
#endif
}

public bool SupportsLongRunning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ public IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<
return StableCompositeDisposable.Create(d, gate);
}

#if !NO_STOPWATCH
/// <summary>
/// Starts a new stopwatch object.
/// </summary>
Expand All @@ -245,7 +244,6 @@ public override IStopwatch StartStopwatch()
//
return new StopwatchImpl();
}
#endif

/// <summary>
/// Ends the thread associated with this scheduler. All remaining work in the scheduler queue is abandoned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public void Dispose()
}
}

#if !NO_STOPWATCH
/// <summary>
/// Starts a new stopwatch object.
/// </summary>
Expand All @@ -191,6 +190,5 @@ public override IStopwatch StartStopwatch()
//
return new StopwatchImpl();
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public IDisposable ScheduleLongRunning<TState>(TState state, Action<TState, ICan
return d;
}

#if !NO_STOPWATCH
/// <summary>
/// Gets a new stopwatch ob ject.
/// </summary>
Expand All @@ -164,7 +163,6 @@ public override IStopwatch StartStopwatch()
//
return new StopwatchImpl();
}
#endif

/// <summary>
/// Schedules a periodic piece of work by running a platform-specific timer to create tasks periodically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public IDisposable ScheduleLongRunning<TState>(TState state, Action<TState, ICan
return s_newBackgroundThread.Value.ScheduleLongRunning(state, action);
}

#if !NO_STOPWATCH
/// <summary>
/// Starts a new stopwatch object.
/// </summary>
Expand All @@ -108,7 +107,6 @@ public override IStopwatch StartStopwatch()
//
return new StopwatchImpl();
}
#endif

/// <summary>
/// Schedules a periodic piece of work, using a System.Threading.Timer object.
Expand Down
2 changes: 0 additions & 2 deletions Rx.NET/Source/src/System.Reactive/Internal/StopwatchImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

#if !NO_STOPWATCH
using System.Diagnostics;

namespace System.Reactive.Concurrency
Expand All @@ -27,4 +26,3 @@ public TimeSpan Elapsed
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,12 @@ public void EventLoop_ScheduleActionDueNested()
#endif

#if !NO_PERF
#if !NO_STOPWATCH
[Fact]
public void Stopwatch()
{
StopwatchTest.Run(new EventLoopScheduler());
}
#endif
#endif

#if !NO_CDS
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ public void NewThread_ScheduleActionDue()
#endif

#if !NO_PERF
#if !NO_STOPWATCH
[Fact]
public void Stopwatch()
{
StopwatchTest.Run(NewThreadScheduler.Default);
}
#endif
#endif

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

#if !NO_STOPWATCH
using System;
using System.Reactive.Concurrency;
using System.Threading;
Expand Down Expand Up @@ -40,4 +39,3 @@ public static void Run(IStopwatchProvider stopwatchProvider)
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,11 @@ public void TaskPool_ScheduleLongRunning()
#endif

#if !NO_PERF
#if !NO_STOPWATCH
[Fact]
public void Stopwatch()
{
StopwatchTest.Run(TaskPoolScheduler.Default);
}
#endif
#endif

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ public void ScheduleLongRunningCancel()
Assert.True(n >= 10);
}

#if !NO_STOPWATCH

[Fact]
public void Stopwatch()
{
Expand All @@ -205,8 +203,6 @@ public void Stopwatch()
Assert.True(s1 > s0);
}

#endif

[Fact]
public void Periodic_ArgumentChecking()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private void Cant_Locate_Scheduler_NoPlib()
}
#endif

#if !NO_PERF && !NO_STOPWATCH
#if !NO_PERF
[Fact]
public void Stopwatch()
{
Expand Down