-
Notifications
You must be signed in to change notification settings - Fork 219
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
Renovate timer services #3853
Renovate timer services #3853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the changes to notifier. Let's zoom sometime.
Be aware of https://github.com/Agoric/agoric-sdk/blob/master/packages/notifier/README.md
I haven't looked at it in a while. If we do go ahead with this change, please check if that doc needs to be updated.
4e62c2b
to
fb2c4a3
Compare
In the interest of decoupling this optimisation from the more urgent changes needed to solve the issues at hand, I've moved the notifier changes and the reliance on them to a new PR #3854. |
fb2c4a3
to
f505504
Compare
f505504
to
7a2c830
Compare
Excellent, thanks! |
With that gone, would you mind if I unlisted myself as a reviewer of this PR? |
Go right ahead! (I couldn't figure out how to do that, but I tried.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
packages/SwingSet/docs/timer.md
Outdated
Then users in the REPL can use the `localTimerService` or `chainTimerService` | ||
(both in seconds) to schedule wakeups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems inconsistent with the above. Is localTimerService
in seconds or milliseconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used to be seconds (but was incorrect). Now I've moved to milliseconds and corrected the polling to be accurate.
createRepeater(delay, interval) { | ||
delay = Nat(delay); | ||
interval = Nat(interval); | ||
return timerService.makeRepeater(delay, interval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good opportunity to get rid of the deprecated createRepeater()
. It's only used in one test in agoric-sdk. I doubt it's used outside this repo.
dda819b
to
3654717
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
In this PR:
TimerService.delay(RelativeTime)
to resolve a Promise after a delayTimerService.createRepeater
swingset-runner
manualTimer.js
chainTimerService
correctlylocalTimerService
correctly and use millisecond resolutionStill needs: