From 7cfc4e5146be5666419451bdd516f1f3f264d24a Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sun, 25 Jan 2015 14:42:51 +0100 Subject: Imported Upstream version 8.5~beta1+dfsg --- lib/control.mli | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/control.mli (limited to 'lib/control.mli') diff --git a/lib/control.mli b/lib/control.mli new file mode 100644 index 00000000..2a496bca --- /dev/null +++ b/lib/control.mli @@ -0,0 +1,26 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* unit +(** Use this function as a potential yield function. If {!interrupt} has been + set, il will raise [Sys.Break]. *) + +val timeout : int -> (unit -> 'a) -> exn -> 'a +(** [timeout n f e] tries to compute [f], and if it fails to do so before [n] + seconds, it raises [e] instead. *) + +type timeout = { timeout : 'a. int -> (unit -> 'a) -> exn -> 'a } + +val set_timeout : timeout -> unit +(** Set a particular timeout function. *) -- cgit v1.2.3