예제 #1
0
        public static void Timer(this IStatsClient stats, string name, Action action)
        {
            var time = Stopwatch.StartNew();

            action();
            stats.Timer(name, time.Elapsed);
        }
예제 #2
0
 public static void Timer(this IStatsClient stats, string name, TimeSpan value) =>
 stats.Timer(name, (ulong)value.TotalMilliseconds);