mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
fix #185. Loading index cache on startup.
This commit is contained in:
26
Wox.Infrastructure/Timeit.cs
Normal file
26
Wox.Infrastructure/Timeit.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user