com.github.yoojia.halo.utils.SystemTime Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of halo-core Show documentation
Show all versions of halo-core Show documentation
A FAST && THIN && HIGH SCALABLE Java web framework
package com.github.yoojia.halo.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author YOOJIA.CHEN ([email protected])
*/
public final class SystemTime {
private static final Logger LOGGER = LoggerFactory.getLogger("SystemTime");
private SystemTime(){}
public static void log(long start, String message){
final long diffNs = System.nanoTime() - start;
final float diffMs = diffNs / 1000000.0f;
LOGGER.debug("{}\t@{} ms", message, diffMs, diffNs);
}
}