[
https://issues.apache.org/jira/browse/FLINK-4422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877941#comment-15877941
]
ASF GitHub Bot commented on FLINK-4422:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/3384#discussion_r102428106
--- Diff:
flink-clients/src/test/java/org/apache/flink/client/program/ClientConnectionTest.java
---
@@ -115,13 +115,13 @@ public void run() {
try {
// wait until the caller is successful, for at
most the given time
- long now = System.currentTimeMillis();
- long deadline = now + MAX_DELAY;
+ long now = System.nanoTime();
+ long deadline = now + MAX_DELAY*1000000;
--- End diff --
I would suggest to express the million literal as `1_000_000` - that is
easier to parse for the reader, making it easier to spot errors.
> Convert all time interval measurements to System.nanoTime()
> -----------------------------------------------------------
>
> Key: FLINK-4422
> URL: https://issues.apache.org/jira/browse/FLINK-4422
> Project: Flink
> Issue Type: Sub-task
> Components: Core
> Reporter: Stephan Ewen
> Assignee: Jin Mingjian
> Priority: Minor
>
> In contrast to {{System.currentTimeMillis()}}, {{System.nanoTime()}} is
> monotonous. To measure delays and time intervals, {{System.nanoTime()}} is
> hence reliable, while {{System.currentTimeMillis()}} is not.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)