/// <inheritdoc />
 public void Time(TimerOptions options, Action action)
 {
     using (_registry.Timer(options, () => Advanced.BuildTimer(options)).NewContext())
     {
         action();
     }
 }
        public ITimer Timer(TimerOptions options)
        {
            if (options.WithReservoir != null)
            {
                return(Timer(options, () => this.BuildTimer(options, options.WithReservoir())));
            }

            return(_registry.Timer(options, () => this.BuildTimer(options)));
        }
Example #3
0
 /// <inheritdoc />
 public void Time(TimerOptions options, Action action)
 {
     using (
         _registry.Timer(
             options,
             () => _timerBuilder.Build(options.Reservoir, _clock))
         .NewContext())
     {
         action();
     }
 }
 /// <inheritdoc />
 public ITimer Instance <T>(TimerOptions options, Func <T> builder)
     where T : ITimerMetric
 {
     return(_registry.Timer(options, builder));
 }