Timer
utility class for things like timing how long a task takes, etc? Mos
Using AOP/AspectJ and @Loggable annotation from jcabi-aspects you can do it easy and compact:
@Loggable(Loggable.DEBUG)
public String getSomeResult() {
// return some value
}
Every call to this method will be sent to SLF4J logging facility with DEBUG
logging level. And every log message will include execution time.