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

link.jfire.testsupport.time.ThreadTimewatch Maven / Gradle / Ivy

The newest version!
package link.jfire.testsupport.time;

public class ThreadTimewatch
{
    private static ThreadLocal t0 = new ThreadLocal<>();
    private static ThreadLocal t1 = new ThreadLocal<>();
    
    public static void start()
    {
        t0.set(System.currentTimeMillis());
    }
    
    public static void end()
    {
        t1.set(System.currentTimeMillis());
    }
    
    public static long getTotalTime()
    {
        return t1.get() - t0.get();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy