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

com.venky.core.log.TimerUtils Maven / Gradle / Ivy

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