src/Pure/ML-Systems/smlnj-interrupt-timeout.ML
author wenzelm
Wed, 27 Sep 2006 23:41:10 +0200
changeset 20745 c35b225a437e
parent 18790 418131f631fc
permissions -rw-r--r--
Compatibility wrapper for Poly/ML 4.9.1.

(*  Title:      Pure/ML-Systems/smlnj-interrupt-timeout.ML
    ID:         $Id$
    Author:     Tjark Weber, Makarius
    Copyright   2006

Bounded time execution (similar to SML/NJ's TimeLimit structure).
*)

fun interrupt_timeout time f x =
  TimeLimit.timeLimit time f x
    handle TimeLimit.TimeOut => raise Interrupt;