Github user garydgregory commented on a diff in the pull request:

    https://github.com/apache/httpcomponents-core/pull/90#discussion_r224965993
  
    --- Diff: 
httpcore5/src/main/java/org/apache/hc/core5/concurrent/BasicFuture.java ---
    @@ -94,7 +95,7 @@ public synchronized T get(final long timeout, final 
TimeUnit unit)
             if (this.completed) {
                 return getResult();
             } else if (waitTime <= 0) {
    -            throw new TimeoutException();
    +            throw TimeoutValueException.ofMillis(msecs, msecs + 
Math.abs(waitTime));
    --- End diff --
    
    Hi @ok2c ,
    
    The 'actual' value is _not_ the number of milliseconds that have elapsed 
since midnight, January 1, 1970. It is a value >= deadline relative to the 
deadline because 'msecs' is equal to the timeout value in millis. The 'actual' 
value is really 'msecs' plus how much over the deadline we waited represented 
by 'waitTime'. This is useful because if the deadline is 30 seconds, but we 
ended up waiting 5 minutes, then we or the user can look for what I claim would 
be a bug, depending on how the Future is used.
    
    Gary


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to