[ 
https://issues.apache.org/jira/browse/FLINK-4421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194158#comment-17194158
 ] 

Andrey Zagrebin commented on FLINK-4421:
----------------------------------------

We already have the Clock interface but its SystemClock implementation does not 
freeze the time to make it monotonous (see FLINK-4423).

I believe we still need the monitonous implementation of currentTimeMillis for 
wall-clock time because nanoTime cannot be used as wall-clock time, only for 
intervals.

> Make clocks and time measurements monotonous
> --------------------------------------------
>
>                 Key: FLINK-4421
>                 URL: https://issues.apache.org/jira/browse/FLINK-4421
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Coordination
>            Reporter: Stephan Ewen
>            Priority: Minor
>
> Currently, many places use {{System.currentTimeMillis()}} to acquire 
> timestamps or measure time intervals.
> Since this relies on the system clock, and the system clock is not 
> necessarily monotonous (in the presence of clock updates), this can lead to 
> negative duration and decreasing timestamps where increasing timestamps are 
> expected.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to