MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / ofEpochMilli

Method ofEpochMilli

Ports/CLDC11/src/java/time/Instant.java:19–23  ·  view source on GitHub ↗
(long epochMilli)

Source from the content-addressed store, hash-verified

17 }
18
19 public static Instant ofEpochMilli(long epochMilli) {
20 long secs = DateTimeSupport.floorDiv(epochMilli, 1000L);
21 int nanos = (int) (DateTimeSupport.floorMod(epochMilli, 1000L) * 1000000L);
22 return new Instant(secs, nanos);
23 }
24
25 public static Instant ofEpochSecond(long epochSecond) {
26 return new Instant(epochSecond, 0);

Callers 4

nowMethod · 0.95
plusMillisMethod · 0.95
parsePatternMethod · 0.95
parsePatternMethod · 0.95

Calls 2

floorDivMethod · 0.95
floorModMethod · 0.95

Tested by

no test coverage detected