static class Profiler {
private static final ThreadLocal<Long> TIME_THREADLOCAL = new ThreadLocal<>();
protected Long initValue(){
return System.currentTimeMillis();
}
public static final void begin(){
TIME_THREADLOCAL.set(System.currentTimeMillis());
}
public static final long end(){
return System.currentTimeMillis() - TIME_THREADLOCAL.get();
}
}
private static final ThreadLocal<Long> TIME_THREADLOCAL = new ThreadLocal<>();
protected Long initValue(){
return System.currentTimeMillis();
}
public static final void begin(){
TIME_THREADLOCAL.set(System.currentTimeMillis());
}
public static final long end(){
return System.currentTimeMillis() - TIME_THREADLOCAL.get();
}
}