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

com.github.yoojia.halo.utils.SystemTime Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
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("[{}ms]\t{}", diffMs, message);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy