Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Allow resetting previously stopped tickers #46

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

cptpcrd
Copy link
Contributor

@cptpcrd cptpcrd commented Sep 13, 2022

Normal time.Tickers support being Stop()ed, then later restarted by calling Reset(). However, mocked clock.Tickers do not; once they are stopped they can never be restarted.

This PR fixes that behavior, and adds tests to ensure it isn't broken again.

@vincentbernat vincentbernat mentioned this pull request Sep 23, 2022
Copy link
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the huge delay -- thanks!

@djmitche djmitche merged commit 023ccf9 into benbjohnson:master Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants