public interface

MonotonicNanoClock

com.facebook.common.time.MonotonicNanoClock
Known Indirect Subclasses

Class Overview

A clock that is guaranteed not to go backward.

Summary

Public Methods
abstract long nowNanos()
Produce a timestamp.

Public Methods

public abstract long nowNanos ()

Produce a timestamp. Values returned from this method may only be compared to other values returned from this clock in this process. They have no meaning outside of this process and should not be written to disk.

The difference between two timestamps is an interval, in nanoseconds.

Returns
  • A timestamp for the current time, in nanoseconds.