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

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