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

10
LINES

< > BotCompany Repo | #1019449 // howLongAgo_comparator

JavaX fragment (include)

1  
static Comparator<S> howLongAgo_comparator() {
2  
  ret makeComparator(func(S a, S b) -> int {
3  
    long timeB = howLongAgo_toMS(b), timeA = howLongAgo_toMS(a);
4  
    int result = cmp(timeB, timeA);
5  
    ifdef howLongAgo_comparator_debug
6  
      print("howLongAgo: " + a + " " + smallerGreaterEqualSign(-result) + " " + b);
7  
    endifdef
8  
    ret result;
9  
  });
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019449
Snippet name: howLongAgo_comparator
Eternal ID of this version: #1019449/4
Text MD5: 114aa7d77233c0a4e258e392e44ae9fe
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-07 01:28:18
Source code size: 360 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 392
Version history: 3 change(s)
Referenced in: [show references]