package com.coreoz.plume.scheduler;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;

import com.coreoz.plume.services.time.TimeProvider;
import com.coreoz.wisp.Scheduler;

@Singleton
public class SchedulerProvider implements Provider<Scheduler> {

	private final Scheduler scheduler;

	@Inject
	public SchedulerProvider(TimeProvider timeProvider) {
		this.scheduler = new Scheduler(
			Scheduler.DEFAULT_THREAD_POOL_SIZE,
			Scheduler.DEFAULT_MINIMUM_DELAY_IN_MILLIS_TO_REPLACE_JOB,
			new PlumeTimeProvider(timeProvider)
		);
	}

	@Override
	public Scheduler get() {
		return scheduler;
	}

}

package com.coreoz.plume.scheduler;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;

import com.coreoz.plume.services.time.TimeProvider;
import com.coreoz.wisp.Scheduler;
import com.coreoz.wisp.SchedulerConfig;

@Singleton
public class SchedulerProvider implements Provider<Scheduler> {

	private final Scheduler scheduler;

	@Inject
	public SchedulerProvider(TimeProvider timeProvider) {
		this.scheduler = new Scheduler(
			SchedulerConfig
				.builder()
				.timeProvider(new PlumeTimeProvider(timeProvider))
				.build()
		);
	}

	@Override
	public Scheduler get() {
		return scheduler;
	}

}

Use Wisp new Scheduler instance creation
Use Wisp new Scheduler instance creation