From 660a2b216990d549338cae1941a7fb9235d16385 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Thu, 28 Aug 2025 10:36:19 +0200 Subject: [PATCH] p3: spec no-op `wait-for`/`wait-until` Signed-off-by: Roman Volosatovs --- wit-0.3.0-draft/monotonic-clock.wit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wit-0.3.0-draft/monotonic-clock.wit b/wit-0.3.0-draft/monotonic-clock.wit index d60a1ec..bb1a2b9 100644 --- a/wit-0.3.0-draft/monotonic-clock.wit +++ b/wit-0.3.0-draft/monotonic-clock.wit @@ -32,12 +32,16 @@ interface monotonic-clock { get-resolution: func() -> duration; /// Wait until the specified instant has occurred. + /// + /// If instant is in the past, this function will return immediately. @since(version = 0.3.0-rc-2025-08-15) wait-until: async func( when: instant, ); /// Wait for the specified duration to elapse. + /// + /// If duration is equal to 0, this function will return immediately. @since(version = 0.3.0-rc-2025-08-15) wait-for: async func( how-long: duration,