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

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