mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 05:07:36 +03:00
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:
parent
5ef89733ae
commit
9ef3a47da5
9 changed files with 214 additions and 88 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue