public interface

MonotonicClock

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

Class Overview

A clock that is guaranteed not to go backward.

Summary

Public Methods
abstract long now()
Produce a timestamp.

Public Methods

public abstract long now ()

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 milliseconds.

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