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

11
LINES

< > BotCompany Repo | #1029452 // WithDuration

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

Libraryless. Click here for Pure Java version (2678L/17K).

sclass WithDuration<A> extends Var<A> {
  double seconds;
  
  *() {}
  *(double *seconds, A value) { super(value); }
  *(A value) { this(now(), value); }
  
  double seconds() { ret seconds; }
  
  toString { ret "[" + formatElapsedTimeWithAppropriateUnit(seconds) + "] " + super.toString(); }
}

Author comment

Began life as a copy of #1026686

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029452
Snippet name: WithDuration
Eternal ID of this version: #1029452/2
Text MD5: e9e4d191efd0d2ae50254fc58c73cc18
Transpilation MD5: 8b13d8937bafeb00674565db608ae8a2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-08 15:17:37
Source code size: 306 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 232 / 519
Version history: 1 change(s)
Referenced in: [show references]