forked from quic-go/quic-go
send multiple packets at once, if the pacing delay is very small
This is an optimization to avoid waking of the run loop every couple of microseconds.
This commit is contained in:
@@ -49,6 +49,13 @@ var _ = Describe("Min / Max", func() {
|
||||
Expect(MaxPacketNumber(1, 2)).To(Equal(protocol.PacketNumber(2)))
|
||||
Expect(MaxPacketNumber(2, 1)).To(Equal(protocol.PacketNumber(2)))
|
||||
})
|
||||
|
||||
It("returns the maximum time", func() {
|
||||
a := time.Now()
|
||||
b := a.Add(time.Second)
|
||||
Expect(MaxTime(a, b)).To(Equal(b))
|
||||
Expect(MaxTime(b, a)).To(Equal(b))
|
||||
})
|
||||
})
|
||||
|
||||
Context("Min", func() {
|
||||
|
||||
Reference in New Issue
Block a user