use the packet receive time in the receivedPacketHandler

By passing the packet receive time to the receivedPacketHandler we can
get rid of two time.Now() syscalls.
This commit is contained in:
Marten Seemann 2018-01-12 11:30:39 +07:00
parent 53dd697adf
commit 9b3139a1d6
6 changed files with 67 additions and 55 deletions

View file

@ -71,13 +71,13 @@ func (mr *MockReceivedPacketHandlerMockRecorder) IgnoreBelow(arg0 interface{}) *
}
// ReceivedPacket mocks base method
func (m *MockReceivedPacketHandler) ReceivedPacket(arg0 protocol.PacketNumber, arg1 bool) error {
ret := m.ctrl.Call(m, "ReceivedPacket", arg0, arg1)
func (m *MockReceivedPacketHandler) ReceivedPacket(arg0 protocol.PacketNumber, arg1 time.Time, arg2 bool) error {
ret := m.ctrl.Call(m, "ReceivedPacket", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ReceivedPacket indicates an expected call of ReceivedPacket
func (mr *MockReceivedPacketHandlerMockRecorder) ReceivedPacket(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedPacket", reflect.TypeOf((*MockReceivedPacketHandler)(nil).ReceivedPacket), arg0, arg1)
func (mr *MockReceivedPacketHandlerMockRecorder) ReceivedPacket(arg0, arg1, arg2 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedPacket", reflect.TypeOf((*MockReceivedPacketHandler)(nil).ReceivedPacket), arg0, arg1, arg2)
}