<commit_before>package se.l4.vibe.timer;

import se.l4.vibe.ListenerHandle;
import se.l4.vibe.internal.timer.TimerImpl;
import se.l4.vibe.percentile.PercentileCounter;
import se.l4.vibe.sampling.SampledProbe;

/**
 * Timer for timing how long things take.
 */
public interface Timer
	extends SampledProbe<TimerSnapshot>
{
	/**
	 * Start timing something.
	 */
	Stopwatch start();

	/**
	 * Add a listener that is triggered whenever this timer is stopped.
	 *
	 * @param listener
	 */
	ListenerHandle addListener(TimerListener listener);

	/**
	 * Remove a previously added listener.
	 *
	 * @param listener
	 */<commit_msg>fix(api): Timer should implement Metric to be exportable<commit_after>package se.l4.vibe.timer;

import se.l4.vibe.ListenerHandle;
import se.l4.vibe.Metric;
import se.l4.vibe.internal.timer.TimerImpl;
import se.l4.vibe.percentile.PercentileCounter;
import se.l4.vibe.sampling.SampledProbe;

/**
 * Timer for timing how long things take.
 */
public interface Timer
	extends SampledProbe<TimerSnapshot>, Metric
{
	/**
	 * Start timing something.
	 */
	Stopwatch start();

	/**
	 * Add a listener that is triggered whenever this timer is stopped.
	 *
	 * @param listener
	 */
	ListenerHandle addListener(TimerListener listener);

	/**
	 * Remove a previously added listener.
	 *
	 * @param listener
	 */
{'fraction_non_alphanumeric': 0.11186696900982615, 'fraction_numerical': 0.008314436885865457, 'mean_word_length': 3.8676470588235294, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6882963', 'n_tokens_mistral': 440, 'n_tokens_neox': 408, 'n_words': 110}