flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request #3420: [FLINK-4422] Convert all time interval measurement...
Date Tue, 28 Feb 2017 15:37:48 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3420#discussion_r103481121
  
    --- Diff: flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/ClosableBlockingQueue.java
---
    @@ -355,13 +355,13 @@ public E getElementBlocking(long timeoutMillis) throws InterruptedException
{
     			throw new IllegalArgumentException("invalid timeout");
     		}
     		
    -		final long deadline = System.currentTimeMillis() + timeoutMillis;
    +		final long deadline = System.nanoTime() + timeoutMillis * 1_000_000L;
    --- End diff --
    
    I think it is nice to have the arguments as either milliseconds, or as `long value, TimeUnit
unit`. That is the unofficial standard in Java which most users implicitly assume.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message