code: public static LocalTime now(Clock clock) {
          Jdk8Methods.requireNonNull(clock, "clock");
          // inline OffsetTime factory to avoid creating object and InstantProvider checks
          final Instant now = clock.instant();  // called once
          ZoneOffset offset = clock.getZone().getRules().getOffset(now);
          long secsOfDay = now.getEpochSecond() % SECONDS_PER_DAY;
          secsOfDay = (secsOfDay + offset.getTotalSeconds()) % SECONDS_PER_DAY;
          if (secsOfDay < 0) {
              secsOfDay += SECONDS_PER_DAY;
          }
          return LocalTime.ofSecondOfDay(secsOfDay, now.getNano());
      }
docs: Obtains the current time from the specified clock.
  <p>
  This will query the specified clock to obtain the current time.
  Using this method allows the use of an alternate clock for testing.
  The alternate clock may be introduced using {@link Clock dependency injection}.
  
  @param clock  the clock to use, not null
  @return the current time, not null