moved Log, Stopwatch to FileFormats. Added Support/Timer.

This commit is contained in:
Bob
2010-01-22 15:12:25 +13:00
parent cba37055e5
commit 8fd0e35d16
5 changed files with 75 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.Support
{
public static class Timer
{
static Stopwatch sw = new Stopwatch();
static double lastTime = 0;
public static void Time( string message )
{
var time = sw.ElapsedTime();
Log.Write( message, time - lastTime );
lastTime = time;
}
}
}