The TimeLimit structure
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
The `TimeLimit` structure

The `TimeLimit` structure provides a mechanism for limiting the execution time of a computation. The mechanism is implemented using the runtime system’s interval timer and the SML/NJ signal mechanism.

## Synopsis

    structure TimeLimit

## Interface

    exception TimeOut

    val timeLimit : Time.time -> ('a -> 'b) -> 'a -> 'b

## Description

`exception TimeOut`

  The exception that is raised if the time limit expires.

`val timeLimit : Time.time -> ('a -> 'b) -> 'a -> 'b`

  `timeLimit t f x` computes the expression `f x`. If the computation takes longer than the time limit `t`, then the `TimeOut` exception is raised.

## See Also

The Util Library

SML/NJ Version 110.99.7 (December 28, 2024)
Last updated 2024-12-27 20:35:08 UTC