using System; using System.Diagnostics; namespace Masuit.Tools.Systems; /// /// 计数器帮助类 /// public static class StopwatchHelper { /// /// 执行方法 /// /// /// public static double Execute(Action action) { var sw = Stopwatch.StartNew(); action(); return sw.ElapsedMilliseconds; } }