Libraryless. Click here for Pure Java version (9223L/51K).
1 | static <A> Timed<A> returnTimed(S desc, IF0<A> f) {
|
2 | ret returnTimed(f).description(desc); |
3 | } |
4 | |
5 | static <A> Timed<A> returnTimed(IF0<A> f) {
|
6 | long time = nanos(); |
7 | A a = f.get(); |
8 | time = nanos()-time; |
9 | ret Timed(a, nsToMS(time)); |
10 | } |
11 | |
12 | static Timed<O> returnTimed(Runnable r) {
|
13 | ret returnTimed(runnableToIF0(r)); |
14 | } |
Began life as a copy of #1009019
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: | #1026094 |
| Snippet name: | returnTimed - evaluate function and return Timed<A> |
| Eternal ID of this version: | #1026094/11 |
| Text MD5: | 72b32752be0a400c29f2ddf8fb025c7d |
| Transpilation MD5: | 071a370c67c937922f0dbef0cb8bf031 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-06-18 22:28:41 |
| Source code size: | 328 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 622 / 796 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |