class MeasurableScheduler extends ThreadPoolExecutor implements ScheduledExecutorService,
                                                           ScheduledService {

    @Override
    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay,
                                                     long delay, TimeUnit unit) {
        if (command == null || unit == null)
            throw new NullPointerException();
        if (delay <= 0)
            throw new IllegalArgumentException();
        RunnableScheduledFuture<?> t = decorateTask(
            command,
            new MeasurableScheduler.ScheduledFutureTask<Boolean>(command, null, triggerTime(
                initialDelay, unit), unit.toNanos(-delay)));
        delayedExecute(t);
        return t;
    }

    public  MeasurableScheduler(final Registry registry, final String name, int poolSize);

}