blob: 995d4df159c4493e5e0c228cce24ab200100bb3f [file] [log] [blame]
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.xtext.oxtype.logger;
import java.util.Date;
import org.slf4j.Logger;
// TODO: Auto-generated Javadoc
/**
* The Class TimeLogger.
*/
public class TimeLogger {
/** The clazz. */
private final Class<?> clazz;
/** The start. */
private final long start;
/**
* Start.
*
* @param clazz
* the clazz
* @return the time logger
*/
public static TimeLogger start(Class<?> clazz) {
return new TimeLogger(clazz);
}
/**
* Instantiates a new time logger.
*
* @param clazz
* the clazz
*/
private TimeLogger(Class<?> clazz) {
this.clazz = clazz;
start = new Date().getTime();
}
/**
* Stop.
*
* @param logger
* the logger
* @param message
* the message
*/
public void stop(Logger logger, String message) {
long stop = new Date().getTime();
// logger.debug((stop - start)
// + "ms : " + message);
}
}