public static void Time(Action run, Action<double> callback) { using (var t = new SimpleTimer(callback)) { run(); } }
public static void DebugTime(string name, Action run) { using (var t = new SimpleTimer((ms) => Debug.WriteLine("{0}\t {1}ms", name, ms))) { run(); } }