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

dk.cooldev.timing.Marker Maven / Gradle / Ivy

The newest version!
package dk.cooldev.timing;

/**
 * Created by cvwj on 07/08/14.
 */
public class Marker {
    private static ThreadLocal tl = new ThreadLocal();

    public static void init() {
        tl.set(new TimeMarker());
    }

    public static void mark(Class clazz, String methodName, String eventName) {
        tl.get().mark(clazz, methodName, eventName);
    }

    public static TimeMarker stop() {
        TimeMarker timeMarker = tl.get();
        timeMarker.stop();
        tl.set(null);
        return timeMarker;
    }

    public static TimeMarker get() {
        return tl.get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy