Module Ccell.Timeout


module Timeout: sig .. end
Time-out Utilty.

This module provides utility functions for timeout operations.


type t 
val make : float -> t
make r returns timeout instance that has resolution of r seconds.
val timeout : t -> float -> 'a -> 'a Ccell.Event.event
timeout t limit v return timeout event. If the timeout occurs after limit seconds, the value of it's event is v.
val with_timeout : t ->
float -> 'a Ccell.Event.event -> 'a option Ccell.Event.event
with_timeout t limit ev returns a new event that wrap the event ev with timeout facility. If the event ev does not occur in limit seconds, the result event returns None. Else returns Some value.