-
Notifications
You must be signed in to change notification settings - Fork 30
Adding a trait to provide current time through the client config #273
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
base: main
Are you sure you want to change the base?
Conversation
Hey @emarteca ! I'm a bit hesitant to add yet more trait - something we explicitly want to avoid in the 1.x branch... Going through the code,
|
Thanks for the review -- and please excuse the delay in response! That makes sense. I will refactor and ping back with changes soon. |
Thanks again for your review -- I've refactored the code as you suggested, in #282 |
There are various places in the source code currently where
MlsTime::now()
is called. This calls theSystemTime::now
(unless we are running in WASM).This PR adds the ability to specialize the clock. This is useful both for testing (setting a deterministic clock), and also for allowing an application to provide an external clock.