1function tf = lineTimeoutExceeded(options)
2% TF = LINETIMEOUTEXCEEDED(OPTIONS)
3% Cooperative wall-clock checkpoint
for iterative
solvers. Returns
true if the
4% elapsed time since
the solver launch (options.timeout_tic, a tic handle set at
5%
the top of
the per-solver runAnalyzer) exceeds options.timeout (seconds).
6% A missing/non-finite/non-positive budget, or a missing tic, means no budget.
8% Copyright (c) 2012-2026, Imperial College London
13 % Global-deadline form: deep utility functions (e.g. multichoose) that
14 % have no options argument consult
the session-level deadline set by
the
15 % per-solver runAnalyzer (see SolverCTMC). Empty appdata means no budget.
16 d = getappdata(0,
'LINEtimeoutDeadline');
20 tf = toc(d.tic) > d.budget;
23if ~isstruct(options) || ~isfield(options,
'timeout') || ~isfield(options,
'timeout_tic')
26budget = options.timeout;
27if isempty(budget) || ~isfinite(budget) || budget <= 0
30tf = toc(options.timeout_tic) > budget;