Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality) and replace it with the familiar System.Diagnostics.Stopwatch.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using OpenRA.Primitives;
|
||||
|
||||
@@ -106,7 +107,7 @@ namespace OpenRA.Support
|
||||
|
||||
public class PerfSample : IDisposable
|
||||
{
|
||||
readonly Stopwatch sw = new Stopwatch();
|
||||
readonly Stopwatch sw = Stopwatch.StartNew();
|
||||
readonly string Item;
|
||||
|
||||
public PerfSample(string item)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
@@ -16,7 +17,7 @@ namespace OpenRA.Support
|
||||
{
|
||||
public class PerfTimer : IDisposable
|
||||
{
|
||||
readonly Stopwatch sw = new Stopwatch();
|
||||
readonly Stopwatch sw = Stopwatch.StartNew();
|
||||
readonly string Name;
|
||||
|
||||
//
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace OpenRA.Support
|
||||
{
|
||||
public class Stopwatch
|
||||
{
|
||||
System.Diagnostics.Stopwatch sw;
|
||||
|
||||
public Stopwatch()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
public System.TimeSpan Elapsed
|
||||
{
|
||||
get { return this.sw.Elapsed; }
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
sw = System.Diagnostics.Stopwatch.StartNew();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user