MCPcopy
hub / github.com/segmentio/kafka-go / deadlineToTimeout

Function deadlineToTimeout

time.go:42–47  ·  view source on GitHub ↗
(deadline time.Time, now time.Time)

Source from the content-addressed store, hash-verified

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

Callers 4

ReadBatchWithMethod · 0.85
deleteTopicsMethod · 0.85
createTopicsMethod · 0.85

Calls 1

IsZeroMethod · 0.80

Tested by

no test coverage detected