Rabbit-R1/switch port/java/sources/io/sentry/SentryAutoDateProvider.java

26 lines
729 B
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package io.sentry;
import io.sentry.util.Platform;
/* loaded from: classes3.dex */
public final class SentryAutoDateProvider implements SentryDateProvider {
private final SentryDateProvider dateProvider;
public SentryAutoDateProvider() {
if (checkInstantAvailabilityAndPrecision()) {
this.dateProvider = new SentryInstantDateProvider();
} else {
this.dateProvider = new SentryNanotimeDateProvider();
}
}
@Override // io.sentry.SentryDateProvider
public SentryDate now() {
return this.dateProvider.now();
}
private static boolean checkInstantAvailabilityAndPrecision() {
return Platform.isJvm() && Platform.isJavaNinePlus();
}
}