Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1011990 // smartBotEval

JavaX fragment (include)

static double smartBotEval_timeout = 120.0;

static S smartBotEval(fS expression) {
  long time = sysNow();
  evalWithTimeout_threadName.set(shorten(expression, 100));
  Either<S, Thread> e = (Either) evalWithTimeout(smartBotEval_timeout, func -> S { smartBotEval_noTimeout(expression) });
  ret e.isA() ? e.a() : "Timeout after " + iround(smartBotEval_timeout) + "s";
}

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: 591 / 565
Version history: 9 change(s)
Referenced in: [show references]