
com.venky.core.log.TimerUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swf-db Show documentation
Show all versions of swf-db Show documentation
Succinct Web Framework - Db
The newest version!
package com.venky.core.log;
import com.venky.core.log.TimerStatistics.Timer;
public class TimerUtils {
@FunctionalInterface
public static interface Execution {
public R execute();
default R wrap(SWFLogger cat, String context) {
Timer timer = cat.startTimer(context);
try {
return execute();
}finally {
timer.stop();
}
}
}
public static R time(SWFLogger cat, String context, Execution e){
return e.wrap(cat,context);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy