Next: , Previous: , Up: Fibers   [Contents][Index]


4.14.4 Timers

Timers are a kind of operation that, you guessed it, let you sleep until a certain time. The timer API can be found in the (fibers timers) module.

Procedure: sleep-operation seconds

Make an operation that will succeed with no values when seconds have elapsed.

Procedure: timer-operation expiry

Make an operation that will succeed when the current time is greater than or equal to expiry, expressed in internal time units. The operation will succeed with no values.

Procedure: sleep seconds

Block the calling fiber until seconds have elapsed.