Skip to main content

off_the_clock

Function off_the_clock 

Source
pub fn off_the_clock<T>(
    what: &'static str,
    bound: Duration,
    work: impl FnOnce() -> T,
) -> T
Expand description

Runs work, one-time setup that is not the conversion’s (what: the format build for the host’s TeX tree), off every deadline: the watchdog’s and the cooperative one (stomach::set_timeout) move back by the time it takes, and while it runs only bound ends it, a watchdog’s breach (exit 124). Calls nest: the outermost one’s time and bound count. Without a watchdog (--timeout 0) nothing bounds it.