src/Pure/ML-Systems/smlnj-interrupt-timeout.ML
author webertj
Mon, 23 Jan 2006 17:29:52 +0100
changeset 18760 97aaecb84afe
child 18790 418131f631fc
permissions -rw-r--r--
TimeLimit replaced by interrupt_timeout

(*  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 SML90.Interrupt;