(deadline time.Time, now time.Time)
| 40 | } |
| 41 | |
| 42 | func deadlineToTimeout(deadline time.Time, now time.Time) time.Duration { |
| 43 | if deadline.IsZero() { |
| 44 | return maxTimeout |
| 45 | } |
| 46 | return deadline.Sub(now) |
| 47 | } |
| 48 | |
| 49 | func adjustDeadlineForRTT(deadline time.Time, now time.Time, rtt time.Duration) time.Time { |
| 50 | if !deadline.IsZero() { |
no test coverage detected