Files
flowframes/Code/MiscUtils/NmkdStopwatch.cs

24 lines
502 B
C#
Raw Normal View History

2021-08-23 16:50:18 +02:00
using System;
using System.Diagnostics;
using System.Linq;
namespace Flowframes.MiscUtils
{
class NmkdStopwatch
{
public Stopwatch sw = new Stopwatch();
public long ElapsedMs { get { return sw.ElapsedMilliseconds; } }
2021-08-23 16:50:18 +02:00
public NmkdStopwatch(bool startOnCreation = true)
2021-08-23 16:50:18 +02:00
{
if (startOnCreation)
sw.Restart();
}
public override string ToString()
2021-08-23 16:50:18 +02:00
{
return FormatUtils.TimeSw(sw);
}
}
}