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

Instant and Duration subscriptions for crux_time #226

Merged
merged 5 commits into from
Apr 28, 2024

Conversation

StuartHarris
Copy link
Member

Updates crux_time capability to be more closely aligned with wasi-clocks.

  • update now to return an Instant, which represents a UTC point in time (number of seconds since the epoch and number of nanoseconds since the last second).
  • add subscribe_duration and its async counterpart. The shell side of the capability responds when the requested duration has elapsed.
  • add subscribe_instant and its async counterpart. The shell side of the capability responds when the requested instant has arrived.
  • Add a test that demonstrates a debounce based on subscribe_duration

Copy link
Contributor

@wasnotrice wasnotrice left a comment

Choose a reason for hiding this comment

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

@StuartHarris great update to time!

@StuartHarris StuartHarris force-pushed the crux-time-subscribes branch from 221d3ba to 1922525 Compare April 27, 2024 09:24
@StuartHarris StuartHarris force-pushed the crux-time-subscribes branch from 1922525 to 56f38df Compare April 27, 2024 09:28
@StuartHarris StuartHarris marked this pull request as ready for review April 27, 2024 09:34
Copy link
Collaborator

@obmarg obmarg left a comment

Choose a reason for hiding this comment

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

Nice, I just have a few naming nitpicks

@obmarg
Copy link
Collaborator

obmarg commented Apr 27, 2024

Though I just skimmed that spec you linked, and have realised that's probably where you got the names. Never mind then

@StuartHarris StuartHarris merged commit 54bc247 into master Apr 28, 2024
9 checks passed
@StuartHarris StuartHarris deleted the crux-time-subscribes branch April 28, 2024 10:57
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.

3 participants