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

se.l4.vibe.timer.Timer Maven / Gradle / Ivy

There is a newer version: 0.4.0
Show newest version
package se.l4.vibe.timer;

import se.l4.vibe.probes.SampledProbe;

/**
 * Timer for timing how long things take. Supports 
 * 
 * @author Andreas Holstenson
 *
 */
public interface Timer
	extends SampledProbe
{
	/**
	 * Start timing something.
	 */
	Stopwatch start();

	/**
	 * Add a listener that is triggered whenever this timer is stopped.
	 * 
	 * @param listener
	 */
	void addListener(TimerListener listener);
	
	/**
	 * Remove a previously added listener.
	 * 
	 * @param listener
	 */
	void removeListener(TimerListener listener);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy