PRELIMINARY
SYNOPSIS

        #include <rtlimits.h>

        mixed limited(closure fun)
        mixed limited(closure fun, int tag, int value, ...)
        mixed limited(closure fun, int * limits [, mixed args...] )

DESCRIPTION
        Call the function <fun> with any given <args> as parameters,
        and execute it with the given runtime limits.
        
        After the function exits, the currently active limits are restored.
        Result of the efun is the result of the closure call.
 
        The runtime limits can be given in two ways: as an array (like the
        one returned from query_limits(), or as a list of tagged values.  If
        the efun is used without any limit specification, all limits are
        supposed to be 'unlimited'.
 
        The limit settings recognize two special values:
            LIMIT_UNLIMITED: the limit is deactivated
            LIMIT_KEEP:      the former setting is kept
            LIMIT_DEFAULT:   the 'global' default setting is used.
       
        The efun causes a privilege violation ("limited", current_object,
        closure).

        A special case is the relaxation of the eval_cost limit: in such
        a case the closure costs only 10 ticks regardless of how many
        ticks it actually needed.

EXAMPLES
        limited(#'function)
          --> executes function with no limits at all

        limited(#'function, ({ 200000 }), "foo")
          --> executes function with an eval_cost limit of 200000, and
              calls function as <function>("foo").

        limited(lambda(0, ({#'function, "foo"})), LIMIT_EVAL, 200000)
          --> executes function with an eval_cost limit of 200000, and
              calls function as <function>("foo").

HISTORY
        Introduced in LDMud 3.2.7.

SEE ALSO
        query_limits(E), set_limits(E)
