Timeout objects and minimal interface Marc Nieper-Wißkirchen (28 Oct 2022 18:25 UTC)
Re: Timeout objects and minimal interface Marc Feeley (28 Oct 2022 18:59 UTC)
Re: Timeout objects and minimal interface Marc Nieper-Wißkirchen (28 Oct 2022 19:15 UTC)
Re: Timeout objects and minimal interface Marc Nieper-Wißkirchen (02 Nov 2022 16:56 UTC)
Re: Timeout objects and minimal interface John Cowan (02 Nov 2022 19:54 UTC)
Re: Timeout objects and minimal interface Marc Nieper-Wißkirchen (02 Nov 2022 21:59 UTC)
Re: Timeout objects and minimal interface Marc Nieper-Wißkirchen (03 Nov 2022 07:50 UTC)

Timeout objects and minimal interface Marc Nieper-Wißkirchen 28 Oct 2022 18:25 UTC

For all use cases, I can think of, SRFI 226 needs only two procedures
that deal with times:

(time? OBJ)
Returns #t if OBJ is a time value representing a point in (proper)
time, #f otherwise.

(nanoseconds-from-now N)
Returns a time value representing N nanoseconds from the time of
invoking this procedure.

For convenience, one can add a third procedure:

(seconds-from-now X)
Returns a time value representing X seconds from the time of invoking
this procedure.

This very minimal interface should be compatible with any high-level
or extended API.

Do you like the names "nanoseconds-from-now" and "seconds-from-now",
or have you thought of better names?

Thanks,

Marc