(Duration duration)
| 22 | private TimeUtils() {} |
| 23 | |
| 24 | @IgnoreJRERequirement |
| 25 | static long convertToNanos(Duration duration) { |
| 26 | try { |
| 27 | return duration.toNanos(); |
| 28 | } catch (ArithmeticException tooBig) { |
| 29 | return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE; |
| 30 | } |
| 31 | } |
| 32 | } |
no outgoing calls