Download Jar. Libraryless. Click here for Pure Java version (938L/7K).
1 | !7 |
2 | |
3 | p { |
4 | long time = now(); |
5 | print("now: " + time); |
6 | int compact = toCompactTimestamp(time); |
7 | print("compact: " + compact); |
8 | long back = fromCompactTimestamp(compact); |
9 | long diff = back-time; |
10 | print("back: " + back + " - diff: " + diff + " ms"); |
11 | assertBetween(-50, 50, diff); |
12 | assertEquals(back, fromCompactTimestamp(toCompactTimestamp(back))); |
13 | print("OK"); |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013136 |
Snippet name: | Test compact time stamps [OK, max 50 ms difference] |
Eternal ID of this version: | #1013136/7 |
Text MD5: | 65fc12c5690fd36cc010e89bf241cabb |
Transpilation MD5: | bfcd41d955bfb4bb39e6d79eea64e509 |
Author: | stefan |
Category: | javax / calendar |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-26 05:33:27 |
Source code size: | 384 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 419 / 948 |
Version history: | 6 change(s) |
Referenced in: | [show references] |