src/Pure/ML-Systems/smlnj-interrupt-timeout.ML
author haftmann
Sun, 23 Jul 2006 07:19:36 +0200
changeset 20183 fd546b0c8a7c
parent 18790 418131f631fc
permissions -rw-r--r--
major simplifications for integers

(*  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;