Libraryless. Click here for Pure Java version (7171L/40K).
1 | static long countPingCalls(Runnable r) {
|
2 | new AtomicLong counter; |
3 | {
|
4 | tempPingSource(new PingSource(-> { incAtomicLong(counter); false; }));
|
5 | r?.run(); |
6 | } |
7 | ret counter!; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034200 |
| Snippet name: | countPingCalls - for PingV3 |
| Eternal ID of this version: | #1034200/8 |
| Text MD5: | 6463b5781f2d37ca8db0c820ef93e1cc |
| Transpilation MD5: | d860b358cc05d547a6e3ca9fe3d669db |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-01-28 21:44:59 |
| Source code size: | 188 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 411 / 546 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |