// 
// Decompiled by Procyon v0.6.0
// 

package io.sentry;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public abstract class SentryDate implements Comparable<SentryDate>
{
    public abstract long nanoTimestamp();
    
    public long laterDateNanosTimestampByDiff(@Nullable final SentryDate otherDate) {
        if (otherDate != null && this.compareTo(otherDate) < 0) {
            return otherDate.nanoTimestamp();
        }
        return this.nanoTimestamp();
    }
    
    public long diff(@NotNull final SentryDate otherDate) {
        return this.nanoTimestamp() - otherDate.nanoTimestamp();
    }
    
    public final boolean isBefore(@NotNull final SentryDate otherDate) {
        return this.diff(otherDate) < 0L;
    }
    
    public final boolean isAfter(@NotNull final SentryDate otherDate) {
        return this.diff(otherDate) > 0L;
    }
    
    @Override
    public int compareTo(@NotNull final SentryDate otherDate) {
        return Long.valueOf(this.nanoTimestamp()).compareTo(otherDate.nanoTimestamp());
    }
}
