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

Stub clock #586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Stub clock #586

wants to merge 1 commit into from

Conversation

PlasmaIntec
Copy link

Makes clock deterministic for test scenarios.

#439

Makes clock deterministic for test scenarios.
Copy link
Collaborator

@pereman2 pereman2 left a comment

Choose a reason for hiding this comment

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

I think we would prefer to have clock inside the IO layer. Because this is also a problem that we have in simulator, and the simulator basically implements the IO differently.

@PlasmaIntec
Copy link
Author

Can you explain more how this is a problem in simulator? I don't see any usages of the get_current_time fn implemented for the IO trait [code].

@penberg
Copy link
Collaborator

penberg commented Jan 4, 2025

Hey @PlasmaIntec, what @pereman2 is saying is that we should fix get_current_time() in the IO trait instead of introducing a separate clock. The purpose of IO is to abstract all non-deterministic behavior in one place for simpler simulation.

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

Successfully merging this pull request may close these issues.

3 participants