-
Notifications
You must be signed in to change notification settings - Fork 7.6k
2.x: Scheduler implement a Clock interface #5678
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
Comments
Well that sounds like wrong abstraction, scheduler shouldn't be source of time, it should depend on some source of time See #3295 |
Standard |
The wrapper is not costly, just more code to write or a dependency to add. If we had the interface we can use it internally as well, but this is just a convenience request that I'm assuming comes at little cost (?) and doesn't break apis. |
I'm not fond of the idea. We have no use for this type of abstraction in RxJava and you'd still have to use RxJava as dependency to access such abstraction. You could simply not fully implement a |
Ok, I'll close |
Uh oh!
There was an error while loading. Please reload this page.
I have frequently passed through a
Scheduler
instance to a class that only uses thenow
method (and does no scheduling). In the interests of clarity in my code (and to leverage compile time checking) I'd prefer to pass through aClock
instance (without creating another object to wrap the Scheduler). Would you mind if I submitted a PR with the addition of a new interface Clock that would be implemented by Scheduler?The text was updated successfully, but these errors were encountered: