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

Add conversion to SystemTime within ReactionCtx #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oowekyala
Copy link
Collaborator

So with @AneesHl and @cmnrd we talked about replacing the use of Instant with SystemTime within the runtime. One problem of Instant is it is opaque, although it can easily be turned into a Duration (from program startup). With SystemTime we would have a Duration since the Unix Epoch, which helps in the short term with LF-Rust/LF-C interop, and in the long term, maybe with federated execution.

Instead of replacing Instant completely though, I wonder if the following changeset would also do the trick. This just adds a conversion function from Instant to SystemTime using a reference point taken at the startup of the program. The runtime otherwise still uses Instant internally, which is nice because it is monotonic.

@lhstrh lhstrh requested a review from cmnrd May 31, 2024 18:42
Copy link
Contributor

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But it looks like clippy isn't happy with the change.

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

Successfully merging this pull request may close these issues.

2 participants