org.mentalog.timestamper.Timestamper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of menta-log Show documentation
Show all versions of menta-log Show documentation
A log library that embraces the kiss principle.
package org.mentalog.timestamper;
/**
* A timestamper interface with support for MILLIS, NANOS and MICROS precision. The default timestamper of MentaLog uses System.currentTimeMillis, but you could
* implement a better one with native support and/or better precision.
*
* Refer to: http://mentalog.soliveirajr.com for documentations, recipes and more.
*
* @author Sergio Oliveira Jr. - [email protected]
*/
public interface Timestamper {
public final static Timestamper MILLIS = new MillisTimestamper();
public static enum Precision {
MILLIS, MICROS, NANOS
};
public Precision getPrecision();
public long getTimestamp();
}