TimeLimit structure added (no proper implementation yet)
authorwebertj
Tue, 01 Jun 2004 00:26:13 +0200
changeset 14851 0fc75361e0c7
parent 14850 393a7be73160
child 14852 fffab59e0050
TimeLimit structure added (no proper implementation yet)
src/Pure/ML-Systems/mlworks.ML
src/Pure/ML-Systems/mosml.ML
--- a/src/Pure/ML-Systems/mlworks.ML	Tue Jun 01 00:18:01 2004 +0200
+++ b/src/Pure/ML-Systems/mlworks.ML	Tue Jun 01 00:26:13 2004 +0200
@@ -59,6 +59,18 @@
 
 use "ML-Systems/cpu-timer-gc.ML"
 
+(* bounded time execution *)
+
+(* FIXME proper implementation available? *)
+
+structure TimeLimit : sig
+   exception TimeOut
+   val timeLimit : Time.time -> ('a -> 'b) -> 'a -> 'b
+end = struct
+   exception TimeOut
+   fun timeLimit t f x =
+      f x;
+end;
 
 (* ML command execution *)
 
--- a/src/Pure/ML-Systems/mosml.ML	Tue Jun 01 00:18:01 2004 +0200
+++ b/src/Pure/ML-Systems/mosml.ML	Tue Jun 01 00:26:13 2004 +0200
@@ -60,6 +60,18 @@
 
 use "ML-Systems/cpu-timer-gc.ML";
 
+(* bounded time execution *)
+
+(* FIXME proper implementation available? *)
+
+structure TimeLimit : sig
+   exception TimeOut
+   val timeLimit : Time.time -> ('a -> 'b) -> 'a -> 'b
+end = struct
+   exception TimeOut
+   fun timeLimit t f x =
+      f x;
+end;
 
 (* ML command execution *)