Skip to content

Commit

Permalink
feat: change API to be regular async func
Browse files Browse the repository at this point in the history
  • Loading branch information
ricochet committed Jan 13, 2025
1 parent cdccee8 commit 3850f9d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions wit-0.3.0-draft/monotonic-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ interface monotonic-clock {
@since(version = 0.3.0)
resolution: func() -> duration;

/// Create a `future` which will resolve once the specified instant
/// has occurred.
/// Wait until the specified instant has occurred.
@since(version = 0.3.0)
subscribe-instant: func(
wait-until: func(
when: instant,
) -> future;
);

/// Create a `future` that will resolve after the specified duration has
/// elapsed from the time this function is invoked.
/// Wait for the specified duration has elapsed.
@since(version = 0.3.0)
subscribe-duration: func(
when: duration,
) -> future;
wait-for: func(
how-long: duration,
);
}

0 comments on commit 3850f9d

Please sign in to comment.