1 | static double smartBotEval_timeout = 120.0; |
2 | |
3 | static S smartBotEval(fS expression) { |
4 | long time = sysNow(); |
5 | evalWithTimeout_threadName.set(shorten(expression, 100)); |
6 | Either<S, Thread> e = (Either) evalWithTimeout(smartBotEval_timeout, func -> S { smartBotEval_noTimeout(expression) }); |
7 | ret e.isA() ? e.a() : "Timeout after " + iround(smartBotEval_timeout) + "s"; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011990 |
Snippet name: | smartBotEval |
Eternal ID of this version: | #1011990/10 |
Text MD5: | 3fcbd03bf55935977714d5bb2bd0f9e9 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-01-10 22:30:19 |
Source code size: | 377 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 593 / 568 |
Version history: | 9 change(s) |
Referenced in: | [show references] |