// Code generated by mockery v2.52.3. DO NOT EDIT.

package clock

import (
	time "time"

	mock "github.com/stretchr/testify/mock"

	clock "github.com/projectcalico/calico/lib/std/clock"
)

// Clock is an autogenerated mock type for the Clock type
type Clock struct {
	mock.Mock
}

// After provides a mock function with given fields: t
func (_m *Clock) After(t time.Duration) <-chan time.Time {
	ret := _m.Called(t)

	if len(ret) == 0 {
		panic("no return value specified for After")
	}

	var r0 <-chan time.Time
	if rf, ok := ret.Get(0).(func(time.Duration) <-chan time.Time); ok {
		r0 = rf(t)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(<-chan time.Time)
		}
	}

	return r0
}

// NewTicker provides a mock function with given fields: d
func (_m *Clock) NewTicker(d time.Duration) clock.Ticker {
	ret := _m.Called(d)

	if len(ret) == 0 {
		panic("no return value specified for NewTicker")
	}

	var r0 clock.Ticker
	if rf, ok := ret.Get(0).(func(time.Duration) clock.Ticker); ok {
		r0 = rf(d)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(clock.Ticker)
		}
	}

	return r0
}

// NewTimer provides a mock function with given fields: d
func (_m *Clock) NewTimer(d time.Duration) clock.Timer {
	ret := _m.Called(d)

	if len(ret) == 0 {
		panic("no return value specified for NewTimer")
	}

	var r0 clock.Timer
	if rf, ok := ret.Get(0).(func(time.Duration) clock.Timer); ok {
		r0 = rf(d)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(clock.Timer)
		}
	}

	return r0
}

// Now provides a mock function with no fields
func (_m *Clock) Now() time.Time {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Now")
	}

	var r0 time.Time
	if rf, ok := ret.Get(0).(func() time.Time); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(time.Time)
	}

	return r0
}

// Since provides a mock function with given fields: t
func (_m *Clock) Since(t time.Time) time.Duration {
	ret := _m.Called(t)

	if len(ret) == 0 {
		panic("no return value specified for Since")
	}

	var r0 time.Duration
	if rf, ok := ret.Get(0).(func(time.Time) time.Duration); ok {
		r0 = rf(t)
	} else {
		r0 = ret.Get(0).(time.Duration)
	}

	return r0
}

// Until provides a mock function with given fields: t
func (_m *Clock) Until(t time.Time) time.Duration {
	ret := _m.Called(t)

	if len(ret) == 0 {
		panic("no return value specified for Until")
	}

	var r0 time.Duration
	if rf, ok := ret.Get(0).(func(time.Time) time.Duration); ok {
		r0 = rf(t)
	} else {
		r0 = ret.Get(0).(time.Duration)
	}

	return r0
}

// NewClock creates a new instance of Clock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewClock(t interface {
	mock.TestingT
	Cleanup(func())
}) *Clock {
	mock := &Clock{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
