mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
DebugHelper is useless, bacuase the return statement is always executed before the actual code.
23 lines
489 B
C#
23 lines
489 B
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace Wox.Infrastructure
|
|
{
|
|
public class Timeit : IDisposable
|
|
{
|
|
private Stopwatch stopwatch = new Stopwatch();
|
|
private string name;
|
|
|
|
public Timeit(string name)
|
|
{
|
|
this.name = name;
|
|
stopwatch.Start();
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
stopwatch.Stop();
|
|
Debug.WriteLine(name + ":" + stopwatch.ElapsedMilliseconds + "ms");
|
|
}
|
|
}
|
|
}
|