package o; /* loaded from: classes.dex */ public enum gtH implements InterfaceC15539gtV { NANOS("Nanos", C15519gso.ofNanos(1)), MICROS("Micros", C15519gso.ofNanos(1000)), MILLIS("Millis", C15519gso.ofNanos(1000000)), SECONDS("Seconds", C15519gso.ofSeconds(1)), MINUTES("Minutes", C15519gso.ofSeconds(60)), HOURS("Hours", C15519gso.ofSeconds(3600)), HALF_DAYS("HalfDays", C15519gso.ofSeconds(43200)), DAYS("Days", C15519gso.ofSeconds(86400)), WEEKS("Weeks", C15519gso.ofSeconds(604800)), MONTHS("Months", C15519gso.ofSeconds(2629746)), YEARS("Years", C15519gso.ofSeconds(31556952)), DECADES("Decades", C15519gso.ofSeconds(315569520)), CENTURIES("Centuries", C15519gso.ofSeconds(3155695200L)), MILLENNIA("Millennia", C15519gso.ofSeconds(31556952000L)), ERAS("Eras", C15519gso.ofSeconds(31556952000000000L)), FOREVER("Forever", C15519gso.ofSeconds(Long.MAX_VALUE, 999999999)); private final C15519gso duration; private final String name; gtH(String str, C15519gso c15519gso) { this.name = str; this.duration = c15519gso; } @Override // o.InterfaceC15539gtV public final boolean isDurationEstimated() { return isDateBased() || this == FOREVER; } @Override // o.InterfaceC15539gtV public final boolean isDateBased() { return compareTo(DAYS) >= 0 && this != FOREVER; } @Override // o.InterfaceC15539gtV public final boolean isTimeBased() { return compareTo(DAYS) < 0; } @Override // o.InterfaceC15539gtV public final boolean isSupportedBy(InterfaceC15536gtL interfaceC15536gtL) { if (this == FOREVER) { return false; } if (interfaceC15536gtL instanceof gsJ) { return isDateBased(); } if ((interfaceC15536gtL instanceof gsO) || (interfaceC15536gtL instanceof gsS)) { return true; } try { interfaceC15536gtL.plus(1L, this); return true; } catch (RuntimeException unused) { try { interfaceC15536gtL.plus(-1L, this); return true; } catch (RuntimeException unused2) { return false; } } } @Override // o.InterfaceC15539gtV public final R addTo(R r, long j) { return (R) r.plus(j, this); } @Override // o.InterfaceC15539gtV public final long between(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15536gtL interfaceC15536gtL2) { return interfaceC15536gtL.until(interfaceC15536gtL2, this); } @Override // java.lang.Enum, o.InterfaceC15539gtV public final String toString() { return this.name; } @Override // o.InterfaceC15539gtV public final C15519gso getDuration() { return this.duration; } }