Returns System.nanoTime() unless the timeout has already elapsed. Returns 0L if and only if the timeout has already elapsed.
(long timeoutNanos)
| 982 | */ |
| 983 | |
| 984 | private static long initNanoTime(long timeoutNanos) { |
| 985 | if (timeoutNanos <= 0L) { |
| 986 | return 0L; |
| 987 | } else { |
| 988 | long startTime = System.nanoTime(); |
| 989 | return (startTime == 0L) ? 1L : startTime; |
| 990 | } |
| 991 | } |
| 992 | |
| 993 | /** |
| 994 | * Returns the remaining nanos until the given timeout, or 0L if the timeout has already elapsed. |
no outgoing calls
no test coverage detected