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

18
LINES

< > BotCompany Repo | #1026093 // Timed - value wrapped with timing result

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

Transpiled version (9197L) is out of date.

1  
sclass Timed<A> extends Var<A> {
2  
  double ms;
3  
  settable S description;
4  
  
5  
  *() {}
6  
  *(A value, long *ms) { super(value); }
7  
  *(A value, double *ms) { super(value); }
8  
  
9  
  toString {
10  
    ret "[" + renderedTime() + "] "
11  
      + joinNemptiesWithComma(description, super.toString());
12  
  }
13  
  
14  
  double ms() { ret ms; }
15  
  double nanos() { ret msToNanos(ms); }
16  
  
17  
  S renderedTime aka renderTime() { ret renderElapsedSecondsPleasantly(msToSeconds(ms)); }
18  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1026093
Snippet name: Timed - value wrapped with timing result
Eternal ID of this version: #1026093/9
Text MD5: e695386a619a2c94a7b8438bc9fc95ee
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-18 22:38:07
Source code size: 467 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 255 / 696
Version history: 8 change(s)
Referenced in: [show references]