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

io.honeycomb.libhoney.transport.batch.ClockProvider Maven / Gradle / Ivy

The newest version!
package io.honeycomb.libhoney.transport.batch;

/**
 * Simple interface to encapsulate the provision of timestamp.
 * Useful to switch out the real clock with a mock clock in testing.
 */
public interface ClockProvider {
    /**
     * @return the current time in millis (since the epoch).
     */
    long getWallTime();

    /**
     * Used for measuring elapsed time, not system or wall-clock time.
     * @return time in nanoseconds
     */
    long getMonotonicTime();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy