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

10
LINES

< > BotCompany Repo | #1034259 // benchFor10

JavaX fragment (include)

1  
// returns minimal time needed
2  
static long benchFor10(S desc default str(r), Runnable r) {
3  
  ret benchForNSeconds(desc, r, 10);
4  
}
5  
6  
// returns result of function
7  
static <A> A benchFor10(S desc default str(f), IF0<A> f) {
8  
  benchFor10(r { f! });
9  
  ret f!;
10  
}

Author comment

Began life as a copy of #1018495

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034259
Snippet name: benchFor10
Eternal ID of this version: #1034259/1
Text MD5: 286d1f8eea1426324667a3cd4b187783
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-29 12:56:30
Source code size: 264 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 153 / 182
Referenced in: [show references]