mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
24 lines
546 B
C#
24 lines
546 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace Flowframes.MiscUtils
|
|
{
|
|
class NmkdStopwatch
|
|
{
|
|
public Stopwatch Sw = new Stopwatch();
|
|
public TimeSpan Elapsed { get { return Sw.Elapsed; } }
|
|
public long ElapsedMs { get { return Sw.ElapsedMilliseconds; } }
|
|
|
|
public NmkdStopwatch(bool startOnCreation = true)
|
|
{
|
|
if (startOnCreation)
|
|
Sw.Restart();
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return FormatUtils.TimeSw(Sw);
|
|
}
|
|
}
|
|
}
|