-
Notifications
You must be signed in to change notification settings - Fork 746
feat(time): Add Interval class #5792
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
Conversation
Use this instead of globals.clock.setInterval since it will give us some more control when needed Signed-off-by: nkomonen-amazon <[email protected]>
|
This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions. |
|
QQ: How are these classes different from |
|
@hayemaxi it behaves the same, but gives us some extra control and allows us to add features to it. An example is this It can also be thought of as how we wrap globalState or setContext |
|
This new |
|
@justinmk3 most of the methods in Timeout dont make sense in the context of an Interval:
Over time if we see a use for something like |
Creates our own version of an Interval, similar to how we have our own Timeout --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <[email protected]>
That can be optional. Not an inherent property of either (except how "Interval" is currently defined in this PR).
That is optional. And a caller may want to do an "eager" refresh.
I don't understand these. But perhaps they also make sense as optional features of |
Creates our own version of an Interval, similar to how we have our own Timeout
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.