Home
last modified time | relevance | path

Searched refs:clock (Results 1 – 25 of 29) sorted by relevance

12

/libcore/ojluni/src/main/java/java/lang/ref/
DSoftReference.java73 static private long clock; field in SoftReference
90 this.timestamp = clock; in SoftReference()
104 this.timestamp = clock; in SoftReference()
117 if (o != null && this.timestamp != clock) in get()
118 this.timestamp = clock; in get()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronology.java423 default ChronoLocalDate dateNow(Clock clock) { in dateNow() argument
424 Objects.requireNonNull(clock, "clock"); in dateNow()
425 return date(LocalDate.now(clock)); in dateNow()
DIsoChronology.java356 public LocalDate dateNow(Clock clock) { in dateNow() argument
357 Objects.requireNonNull(clock, "clock"); in dateNow()
358 return date(LocalDate.now(clock)); in dateNow()
DMinguoChronology.java248 public MinguoDate dateNow(Clock clock) { in dateNow() argument
249 return date(LocalDate.now(clock)); in dateNow()
DThaiBuddhistChronology.java284 public ThaiBuddhistDate dateNow(Clock clock) { in dateNow() argument
285 return date(LocalDate.now(clock)); in dateNow()
DThaiBuddhistDate.java157 public static ThaiBuddhistDate now(Clock clock) { in now() argument
158 return new ThaiBuddhistDate(LocalDate.now(clock)); in now()
DMinguoDate.java157 public static MinguoDate now(Clock clock) { in now() argument
158 return new MinguoDate(LocalDate.now(clock)); in now()
DJapaneseChronology.java304 public JapaneseDate dateNow(Clock clock) { in dateNow() argument
305 return date(LocalDate.now(clock)); in dateNow()
DHijrahDate.java209 public static HijrahDate now(Clock clock) { in now() argument
210 return HijrahDate.ofEpochDay(HijrahChronology.INSTANCE, LocalDate.now(clock).toEpochDay()); in now()
DJapaneseDate.java190 public static JapaneseDate now(Clock clock) { in now() argument
191 return new JapaneseDate(LocalDate.now(clock)); in now()
DHijrahChronology.java514 public HijrahDate dateNow(Clock clock) { in dateNow() argument
515 return date(LocalDate.now(clock)); in dateNow()
/libcore/ojluni/src/main/java/java/time/
DOffsetDateTime.java238 public static OffsetDateTime now(Clock clock) { in now() argument
239 Objects.requireNonNull(clock, "clock"); in now()
240 final Instant now = clock.instant(); // called once in now()
241 return ofInstant(now, clock.getZone().getRules().getOffset(now)); in now()
DMonthDay.java189 public static MonthDay now(Clock clock) { in now() argument
190 final LocalDate now = LocalDate.now(clock); // called once in now()
DLocalTime.java271 public static LocalTime now(Clock clock) { in now() argument
272 Objects.requireNonNull(clock, "clock"); in now()
274 final Instant now = clock.instant(); // called once in now()
275 return ofInstant(now, clock.getZone()); in now()
DInstant.java281 public static Instant now(Clock clock) { in now() argument
282 Objects.requireNonNull(clock, "clock"); in now()
283 return clock.instant(); in now()
DLocalDateTime.java203 public static LocalDateTime now(Clock clock) { in now() argument
204 Objects.requireNonNull(clock, "clock"); in now()
205 final Instant now = clock.instant(); // called once in now()
206 ZoneOffset offset = clock.getZone().getRules().getOffset(now); in now()
DLocalDate.java215 public static LocalDate now(Clock clock) { in now() argument
216 Objects.requireNonNull(clock, "clock"); in now()
218 final Instant now = clock.instant(); // called once in now()
219 ZoneOffset offset = clock.getZone().getRules().getOffset(now); in now()
DYear.java199 public static Year now(Clock clock) { in now() argument
200 final LocalDate now = LocalDate.now(clock); // called once in now()
DYearMonth.java192 public static YearMonth now(Clock clock) { in now() argument
193 final LocalDate now = LocalDate.now(clock); // called once in now()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDate.java278 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); in now_Clock_allSecsInDay_utc() local
279 LocalDate test = LocalDate.now(clock); in now_Clock_allSecsInDay_utc()
290 … Clock clock = Clock.fixed(instant.minusSeconds(OFFSET_PONE.getTotalSeconds()), OFFSET_PONE);
291 LocalDate test = LocalDate.now(clock);
302 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
303 LocalDate test = LocalDate.now(clock);
313 Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC);
314 LocalDate test = LocalDate.now(clock);
320 Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC);
321 LocalDate.now(clock);
[all …]
DTCKLocalDateTime.java310 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
311 LocalDateTime test = LocalDateTime.now(clock);
326 … Clock clock = Clock.fixed(instant.minusSeconds(OFFSET_PONE.getTotalSeconds()), OFFSET_PONE);
327 LocalDateTime test = LocalDateTime.now(clock);
343 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
344 LocalDateTime test = LocalDateTime.now(clock);
356 Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC);
357 LocalDateTime test = LocalDateTime.now(clock);
363 Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC);
364 LocalDateTime.now(clock);
[all …]
DTCKOffsetDateTime.java261 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
262 OffsetDateTime test = OffsetDateTime.now(clock);
278 … Clock clock = Clock.fixed(instant.minusSeconds(OFFSET_PONE.getTotalSeconds()), OFFSET_PONE);
279 OffsetDateTime test = OffsetDateTime.now(clock);
296 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
297 OffsetDateTime test = OffsetDateTime.now(clock);
312 Clock clock = Clock.fixed(base.toInstant(), offset);
313 OffsetDateTime test = OffsetDateTime.now(clock);
DTCKOffsetTime.java225 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
226 OffsetTime test = OffsetTime.now(clock);
239 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
240 OffsetTime test = OffsetTime.now(clock);
254 Clock clock = Clock.fixed(base, offset);
255 OffsetTime test = OffsetTime.now(clock);
DTCKLocalTime.java269 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); in now_Clock_allSecsInDay() local
270 LocalTime test = LocalTime.now(clock); in now_Clock_allSecsInDay()
282 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); in now_Clock_beforeEpoch() local
283 LocalTime test = LocalTime.now(clock); in now_Clock_beforeEpoch()
294 Clock clock = Clock.fixed(Instant.MAX, ZoneOffset.UTC); in now_Clock_max() local
295 LocalTime test = LocalTime.now(clock); in now_Clock_max()
304 Clock clock = Clock.fixed(Instant.MIN, ZoneOffset.UTC); in now_Clock_min() local
305 LocalTime test = LocalTime.now(clock); in now_Clock_min()
DTCKZonedDateTime.java278 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
279 ZonedDateTime test = ZonedDateTime.now(clock);
298 Clock clock = Clock.fixed(expected.toInstant(), zone);
299 ZonedDateTime test = ZonedDateTime.now(clock);
309 Clock clock = Clock.fixed(instant, ZoneOffset.UTC);
310 ZonedDateTime test = ZonedDateTime.now(clock);
326 Clock clock = Clock.fixed(base.toInstant(), offset);
327 ZonedDateTime test = ZonedDateTime.now(clock);

12