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

10
LINES

< > BotCompany Repo | #1012926 - returnTimeFor - instant profiling

JavaX fragment (include)

1  
static long returnTimeFor(int n, O f) {
2  
  long time = sysNow();
3  
  for i to n:
4  
    callF(f);
5  
  ret ratio(sysNow()-time, n);
6  
}
7  
8  
static long returnTimeFor(Runnable f) {
9  
  ret returnTimeFor(1, f);
10  
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1012926
Snippet name: returnTimeFor - instant profiling
Eternal ID of this version: #1012926/2
Text MD5: 1cb580e495f573cfbb4b694f7a640363
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-04 14:32:15
Source code size: 203 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 223 / 250
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1012926 & http://1012926.tinybrain.de