@Test public void startTime() throws InterruptedException { LegacyJavaRuntime runtime = new LegacyJavaRuntime(); Timestamp first = runtime.getStartTime(); assertThat(first.toInstant()).isBefore(Instant.now()); Thread.sleep(1); Timestamp second = runtime.getStartTime(); assertThat(second.toInstant()).isEqualTo(first.toInstant()); }
@Override public Timestamp getStartTime() { return startTime; }
LegacyJavaRuntime extends AbstractJavaRuntime { @Override public Timestamp getStartTime() { return startTime; } }
LegacyJavaRuntime extends AbstractJavaRuntime { @Override public Timestamp getStartTime() { return startTime; } LegacyJavaRuntime(); }
LegacyJavaRuntime extends AbstractJavaRuntime { @Override public Timestamp getStartTime() { return startTime; } LegacyJavaRuntime(); @Override boolean isAndroid(); @Override long getProcessId(); @Override Timestamp getStartTime(); @Override @SuppressWarnings("removal") @IgnoreJRERequirement String getCallerClassName(final int depth); @Override String getCallerClassName(final String loggerClassName); @Override StackTraceElement getCallerStackTraceElement(final int depth); @Override StackTraceElement getCallerStackTraceElement(final String loggerClassName); @Override Timestamp createTimestamp(); @Override TimestampFormatter createTimestampFormatter(final String pattern, final Locale locale); }
LegacyJavaRuntime extends AbstractJavaRuntime { @Override public Timestamp getStartTime() { return startTime; } LegacyJavaRuntime(); @Override boolean isAndroid(); @Override long getProcessId(); @Override Timestamp getStartTime(); @Override @SuppressWarnings("removal") @IgnoreJRERequirement String getCallerClassName(final int depth); @Override String getCallerClassName(final String loggerClassName); @Override StackTraceElement getCallerStackTraceElement(final int depth); @Override StackTraceElement getCallerStackTraceElement(final String loggerClassName); @Override Timestamp createTimestamp(); @Override TimestampFormatter createTimestampFormatter(final String pattern, final Locale locale);  }