Skip to content

Commit

Permalink
[FLINK-17654] Make Clock interfaces in flink-core PublicEvolving
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed May 14, 2020
1 parent 1fb819a commit ab86a3c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package org.apache.flink.util.clock;

import org.apache.flink.annotation.PublicEvolving;

/**
* A clock that gives access to time. This clock returns two flavors of time:
*
Expand All @@ -35,6 +37,7 @@
* not affected by adjustments to the system clock, so it never jumps. Relative time behaves similar
* to {@link System#nanoTime()}.
*/
@PublicEvolving
public abstract class Clock {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@

package org.apache.flink.util.clock;

import org.apache.flink.annotation.PublicEvolving;

import java.time.Duration;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;

/**
* A {@link Clock} implementation which allows to advance time manually.
*/
@PublicEvolving
public final class ManualClock extends Clock {

private AtomicLong currentTime = new AtomicLong(0L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

package org.apache.flink.util.clock;

import org.apache.flink.annotation.PublicEvolving;

/**
* A clock that returns the time of the system / process.
*
Expand All @@ -26,6 +28,7 @@
*
* <p>This SystemClock exists as a singleton instance.
*/
@PublicEvolving
public final class SystemClock extends Clock {

private static final SystemClock INSTANCE = new SystemClock();
Expand Down

0 comments on commit ab86a3c

Please sign in to comment.