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

10
LINES

< > BotCompany Repo | #1034259 // benchFor10

JavaX fragment (include)

// returns minimal time needed
static long benchFor10(S desc default str(r), Runnable r) {
  ret benchForNSeconds(desc, r, 10);
}

// returns result of function
static <A> A benchFor10(S desc default str(f), IF0<A> f) {
  benchFor10(r { f! });
  ret f!;
}

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: 151 / 180
Referenced in: [show references]