Home
last modified time | relevance | path

Searched refs:secs (Results 1 – 12 of 12) 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/util/concurrent/
DTimeUnit.java218 long secs = duration.getSeconds(); in convert() local
220 if (secs < 0 && nano > 0) { in convert()
222 secs++; in convert()
232 return secs; in convert()
234 return secs / secRatio; in convert()
235 long val = secs * secRatio + nanoVal; in convert()
236 return ((secs < maxSecs && secs > -maxSecs) || in convert()
237 (secs == maxSecs && val > 0) || in convert()
238 (secs == -maxSecs && val < 0)) in convert()
240 : (secs > 0) ? Long.MAX_VALUE : Long.MIN_VALUE; in convert()
/libcore/ojluni/src/main/java/java/time/
DDuration.java242 long secs = Math.addExact(seconds, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofSeconds() local
244 return create(secs, nos); in ofSeconds()
257 long secs = millis / 1000; in ofMillis() local
261 secs--; in ofMillis()
263 return create(secs, mos * 1000_000); in ofMillis()
276 long secs = nanos / NANOS_PER_SECOND; in ofNanos() local
280 secs--; in ofNanos()
282 return create(secs, nos); in ofNanos()
438 … create(boolean negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs, long secs, int nanos) { in create() argument
439 …g seconds = Math.addExact(daysAsSecs, Math.addExact(hoursAsSecs, Math.addExact(minsAsSecs, secs))); in create()
[all …]
DInstant.java323 long secs = Math.addExact(epochSecond, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofEpochSecond() local
325 return create(secs, nos); in ofEpochSecond()
339 long secs = Math.floorDiv(epochMilli, 1000); in ofEpochMilli() local
341 return create(secs, mos * 1000_000); in ofEpochMilli()
DOffsetTime.java1247 long secs = epochDay * 86400 + time.toSecondOfDay(); in toEpochSecond() local
1248 secs -= offset.getTotalSeconds(); in toEpochSecond()
1249 return secs; in toEpochSecond()
DLocalTime.java1507 long secs = epochDay * 86400 + toSecondOfDay(); in toEpochSecond() local
1508 secs -= offset.getTotalSeconds(); in toEpochSecond()
1509 return secs; in toEpochSecond()
DLocalDate.java1986 long secs = toEpochDay() * SECONDS_PER_DAY + time.toSecondOfDay(); in toEpochSecond() local
1987 secs -= offset.getTotalSeconds(); in toEpochSecond()
1988 return secs; in toEpochSecond()
/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.java473 long secs = epochDay * 86400 + toLocalTime().toSecondOfDay(); in toEpochSecond() local
474 secs -= offset.getTotalSeconds(); in toEpochSecond()
475 return secs; in toEpochSecond()
DChronoZonedDateTime.java554 long secs = epochDay * 86400 + toLocalTime().toSecondOfDay(); in toEpochSecond() local
555 secs -= getOffset().getTotalSeconds(); in toEpochSecond()
556 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.java2165 int secs = (int) (Long.MAX_VALUE % (24L * 60L * 60L));
2166 assertEquals(t, LocalTime.of(2, 30).minusSeconds(secs));