[ https://issues.apache.org/jira/browse/FLINK-4422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877999#comment-15877999 ]
ASF GitHub Bot commented on FLINK-4422: --------------------------------------- Github user jinmingjian commented on a diff in the pull request: https://github.com/apache/flink/pull/3384#discussion_r102435330 --- 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 -- agree, although I commonly use 1000_000 in fact:) I planed to use [this detailed idea style](https://raw.githubusercontent.com/dawidwys/flink/bee981be8aa83225a8e3a736700eae445d79cece/tools/FlinkCodeStyle.xml) after digging today's discussions in mail list. Is this OK?:) > 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)