Libraryless. Click here for Pure Java version (2799L/17K).
// returns minimal time needed static long benchFor1Second(S desc, Runnable r) { ret benchForNSeconds(desc, r, 1); } static long benchFor1Second(Runnable r) { ret benchFor1Second(str(r), r); } // returns result of function static <A> A benchFor1Second(S desc default str(f), IF0<A> f) { benchFor1Second(r { f! }); ret f!; }
Began life as a copy of #1018495
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028032 |
| Snippet name: | benchFor1Second |
| Eternal ID of this version: | #1028032/3 |
| Text MD5: | 6d90f03a58c26cd6e3a85d86dd130b2c |
| Transpilation MD5: | 3c19c2f4c1e80d5dde4e93df0ecd09c0 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-10-13 15:48:55 |
| Source code size: | 346 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 450 / 604 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |