utils: remove scarcely used time helper functions (#4593)

This commit is contained in:
Marten Seemann
2024-07-23 15:16:12 -06:00
committed by GitHub
parent e179048526
commit 8451b0afd7
8 changed files with 19 additions and 90 deletions

View File

@@ -2,11 +2,11 @@ package wire
import (
"errors"
"math"
"sort"
"time"
"github.com/quic-go/quic-go/internal/protocol"
"github.com/quic-go/quic-go/internal/utils"
"github.com/quic-go/quic-go/quicvarint"
)
@@ -40,7 +40,7 @@ func parseAckFrame(frame *AckFrame, b []byte, typ uint64, ackDelayExponent uint8
delayTime := time.Duration(delay*1<<ackDelayExponent) * time.Microsecond
if delayTime < 0 {
// If the delay time overflows, set it to the maximum encode-able value.
delayTime = utils.InfDuration
delayTime = time.Duration(math.MaxInt64)
}
frame.DelayTime = delayTime