pass the current timestamp to the pacer instead of calling time.Now() (#3824)

This commit is contained in:
Marten Seemann
2023-06-03 10:26:30 +03:00
committed by GitHub
parent 072a602cc1
commit b27d114f07
9 changed files with 114 additions and 127 deletions

View File

@@ -20,7 +20,7 @@ type SentPacketHandler interface {
SetHandshakeConfirmed()
// The SendMode determines if and what kind of packets can be sent.
SendMode() SendMode
SendMode(now time.Time) SendMode
// TimeUntilSend is the time when the next packet should be sent.
// It is used for pacing packets.
TimeUntilSend() time.Time