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

8
LINES

< > BotCompany Repo | #1034200 // countPingCalls - for PingV3

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7171L/40K).

static long countPingCalls(Runnable r) {
  new AtomicLong counter;
  {
    tempPingSource(new PingSource(-> { incAtomicLong(counter); false; }));
    r?.run();
  }
  ret counter!;
}

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