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

net.ttddyy.dsproxy.proxy.Stopwatch Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package net.ttddyy.dsproxy.proxy;

import net.ttddyy.dsproxy.ExecutionInfo;
import net.ttddyy.dsproxy.listener.MethodExecutionContext;

/**
 * Used to measure elapsed time for execution.
 *
 * @author Tadaya Tsuyukubo
 * @see SystemStopwatchFactory.SystemStopwatch
 * @see NanoTimeStopwatchFactory.NanoTimeStopwatch
 * @see ExecutionInfo#getElapsedTime()
 * @see MethodExecutionContext#getElapsedTime()
 * @since 1.6
 */
public interface Stopwatch {

    /**
     * Start the stopwatch.
     *
     * @return stopwatch
     */
    Stopwatch start();

    /**
     * Get the time from {@link #start()}.
     * The unit of returned time depends on the implementation class.
     *
     * @return elapsed time
     */
    long getElapsedTime();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy