static double smartBotEval_timeout = 60.0; // assumes we have DB lock static S smartBotEval(fS expression) { long time = sysNow(); evalWithTimeout_threadName.set(shorten(expression, 100)); Either e = (Either) evalWithTimeout(smartBotEval_timeout, func -> S { smartBotEval_noTimeout(expression) }); ret e.isA() ? e.a() : "Timeout after " + iround(smartBotEval_timeout) + "s"; }