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

Allow overriding system time with custom time provider #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

merose
Copy link

@merose merose commented Jul 16, 2023

Add an interface for a custom time provider. Allow setting a time provider to override system time, in order to use a simulated time instead. Augment unit tests.

Add an interface for a custom time provider. Allow setting a time
provider to override system time, in order to use a simulated time
instead. Augment unit tests.
@xpromache
Copy link
Member

Thanks for the pull request. I have two comments:

  • shouldn't we use the java spi ([Service Provider Interface) for this?
  • shouldn't the time provider return directly the CcsdsTime ( may be higher resolution than milliseconds) ?

Respond to code review comments by changing TimeProvider to return a
CcsdsTime directly, rather than a Java time, and to be found by
CcsdsTime by using the Java service loader facilities.
@merose
Copy link
Author

merose commented Aug 30, 2023

Applied both of your comments.

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

Successfully merging this pull request may close these issues.

2 participants