Libraryless. Click here for Pure Java version (5596L/32K).
1 | static <A> S evalWithTimeout_text(double timeoutSeconds, IF0<A> f) { |
2 | ret evalWithTimeout_text(timeoutSeconds, (O) f); |
3 | } |
4 | |
5 | sS evalWithTimeout_text(double timeoutSeconds, fO f) { |
6 | ret evalWithTimeout_text(toMS_int(timeoutSeconds), f); |
7 | } |
8 | |
9 | // f : func -> O |
10 | static S evalWithTimeout_text(final int timeoutMS, fO f) { |
11 | ret pcallOrExceptionText_strOrNull(func { |
12 | evalWithTimeoutOrException(timeoutMS, func { strOrNull(callF(f)) }) |
13 | }); |
14 | } |
Began life as a copy of #1018060
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018065 |
Snippet name: | evalWithTimeout_text - uses strOrNull, pcalls, returns exception text |
Eternal ID of this version: | #1018065/10 |
Text MD5: | 1204c4b4eb9a6f8c71291d0c079d2df5 |
Transpilation MD5: | 8266be7ac724974a6189c05e6d32c062 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-11 09:50:20 |
Source code size: | 450 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 368 / 461 |
Version history: | 9 change(s) |
Referenced in: | [show references] |