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

org.mentalog.timestamper.Timestamper Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy