Instant.now

Obtains the current instant from the system clock. !(p) This will query the {@link Clock#systemUTC() system UTC clock} to obtain the current instant. !(p) Using this method will prevent the ability to use an alternate time-source for testing because the clock is effectively hard-coded.

@return the current instant using the system clock, not null

  1. Instant now()
    class Instant
    static
    now
    ()
  2. Instant now(Clock clock)

Meta