Home
last modified time | relevance | path

Searched refs:secs (Results 1 – 8 of 8) sorted by relevance

/libcore/ojluni/src/main/java/java/nio/file/attribute/
DFileTime.java146 long secs = unit.convert(instant.getEpochSecond(), TimeUnit.SECONDS); in to() local
147 if (secs == Long.MIN_VALUE || secs == Long.MAX_VALUE) { in to()
148 return secs; in to()
151 long r = secs + nanos; in to()
153 if (((secs ^ r) & (nanos ^ r)) < 0) { in to()
154 return (secs < 0) ? Long.MIN_VALUE : Long.MAX_VALUE; in to()
173 long secs = instant.getEpochSecond(); in toMillis() local
176 long r = secs * 1000; in toMillis()
177 long ax = Math.abs(secs); in toMillis()
179 if ((r / 1000) != secs) { in toMillis()
[all …]
/libcore/ojluni/src/main/java/java/time/
DDuration.java239 long secs = Math.addExact(seconds, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofSeconds() local
241 return create(secs, nos); in ofSeconds()
254 long secs = millis / 1000; in ofMillis() local
258 secs--; in ofMillis()
260 return create(secs, mos * 1000_000); in ofMillis()
273 long secs = nanos / NANOS_PER_SECOND; in ofNanos() local
277 secs--; in ofNanos()
279 return create(secs, nos); in ofNanos()
435 … create(boolean negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs, long secs, int nanos) { in create() argument
436 …g seconds = Math.addExact(daysAsSecs, Math.addExact(hoursAsSecs, Math.addExact(minsAsSecs, secs))); in create()
[all …]
DInstant.java322 long secs = Math.addExact(epochSecond, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofEpochSecond() local
324 return create(secs, nos); in ofEpochSecond()
338 long secs = Math.floorDiv(epochMilli, 1000); in ofEpochMilli() local
340 return create(secs, mos * 1000_000); in ofEpochMilli()
/libcore/ojluni/src/test/java/nio/file/attribute/
DFileTimeTest.java157 long secs = v % MAX_SECOND; in main() local
158 Instant instant = Instant.ofEpochSecond(secs, rand.nextInt(1000_000_000)); in main()
160 if (!ft.toInstant().equals(instant) || ft.to(SECONDS) != secs) { in main()
172 secs = nanos / 1000_000_000; in main()
174 instant = Instant.ofEpochSecond(secs, nanos); in main()
296 long secs = SECONDS.convert(value, unit); in eqTime() local
297 long nanos = NANOSECONDS.convert(value - unit.convert(secs, SECONDS), unit); in eqTime()
299 secs -= 1; in eqTime()
302 if (secs != instant.getEpochSecond() || (int)nanos != instant.getNano()) { in eqTime()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTime.java466 long secs = epochDay * 86400 + toLocalTime().toSecondOfDay(); in toEpochSecond() local
467 secs -= offset.getTotalSeconds(); in toEpochSecond()
468 return secs; in toEpochSecond()
DChronoZonedDateTime.java547 long secs = epochDay * 86400 + toLocalTime().toSecondOfDay(); in toEpochSecond() local
548 secs -= getOffset().getTotalSeconds(); in toEpochSecond()
549 return secs; in toEpochSecond()
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java135 long secs, in create() argument
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalTime.java2137 int secs = (int) (Long.MAX_VALUE % (24L * 60L * 60L));
2138 assertEquals(t, LocalTime.of(2, 30).minusSeconds(secs));