Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SpyTime Receiver Function Name from Sleep to SetDurationSlept #753

Open
elmq0022 opened this issue Mar 30, 2024 · 1 comment
Open

Comments

@elmq0022
Copy link

Reason for Change

Using Sleep for the name incorrectly implies that this function exists to satisfy the Sleeper interface. In fact, the receiver function can use any valid function name. The only requirement is the function's signature matches that of ConfigurableSleeper's sleep member, i.e func(time.Duration).

Why SetDurationSlept

SetDurationSlept accurately describes what the function does. That is SpyTime.SetDurationSlept(5*t.Seconds) sets SpyTime's durationSlept member to 5 seconds.

I will open a PR if the maintainer(s) is(are) interested.

@quii
Copy link
Owner

quii commented Jun 21, 2024

Good points!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants