Skip to content

feat: add Peek() method to mock Clock #13657

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

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Jun 25, 2024

Adds a Peek() method to the mock clock, so you can peek at how long until the next tick or timer event without advancing the clock.

@spikecurtis spikecurtis requested review from kylecarbs, mafredri and johnstcn and removed request for kylecarbs June 25, 2024 12:26
@spikecurtis spikecurtis marked this pull request as ready for review June 25, 2024 12:26
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Next() implies advancing the clock. How about Peek() instead?

Copy link
Contributor Author

I like Peek

@spikecurtis spikecurtis force-pushed the spike/clock-testing-next branch from 93b53f2 to d153c36 Compare June 25, 2024 12:35
@spikecurtis spikecurtis changed the title feat: add Next() method to mock Clock feat: add Peek() method to mock Clock Jun 25, 2024
@spikecurtis spikecurtis requested a review from johnstcn June 25, 2024 12:36
Base automatically changed from spike/clock-testing-readme-usage to main June 25, 2024 12:38
@spikecurtis spikecurtis force-pushed the spike/clock-testing-next branch from d153c36 to 5fb9cfe Compare June 25, 2024 12:39
@spikecurtis spikecurtis force-pushed the spike/clock-testing-next branch from 5fb9cfe to efa2738 Compare June 25, 2024 12:39
Copy link
Contributor Author

spikecurtis commented Jun 25, 2024

Merge activity

  • Jun 25, 8:39 AM EDT: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.
  • Jun 25, 8:48 AM EDT: @spikecurtis merged this pull request with Graphite.

@spikecurtis spikecurtis merged commit 46e1c36 into main Jun 25, 2024
27 checks passed
@spikecurtis spikecurtis deleted the spike/clock-testing-next branch June 25, 2024 12:48
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
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.

2 participants