question: < T > void checkTimedGet ( Future < T > f , T expectedValue , long timeoutMillis ) { long startTime = System . nanoTime ( ) ; try { assertEquals ( expectedValue , f . get ( timeoutMillis , MILLISECONDS ) ) ; } catch ( Throwable fail ) { threadUnexpectedException ( fail ) ; } if ( millisElapsedSince ( startTime ) > timeoutMillis / 2 ) throw new AssertionFailedError ( "timed get did not return promptly" ) ; }
target:  Checks that timed f.get() returns the expected value, and does not wait for the timeout to elapse before returning.