All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javasimon.source.CachedStopwatchSource Maven / Gradle / Ivy

The newest version!
package org.javasimon.source;

import org.javasimon.Split;
import org.javasimon.Stopwatch;

/**
 * Cached sources using {@link org.javasimon.Stopwatch} as monitors.
 *
 * @author Richard "Virgo" Richter
 * @since 3.4
 */
public abstract class CachedStopwatchSource extends CachedMonitorSource implements StopwatchSource {
	public CachedStopwatchSource(StopwatchSource delegate) {
		super(delegate);
	}

	@Override
	public Split start(L location) {
		if (isMonitored(location)) {
			return getMonitor(location).start();
		}
		return Split.DISABLED;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy