public static void Timer(this IStatsClient stats, string name, Action action) { var time = Stopwatch.StartNew(); action(); stats.Timer(name, time.Elapsed); }
public static void Timer(this IStatsClient stats, string name, TimeSpan value) => stats.Timer(name, (ulong)value.TotalMilliseconds);