if (timeFromNextLogin != null && endtimestamp == null) {
endtimestamp = Instant.now().plus(timeFromNextLogin, ChronoUnit.SECONDS).getEpochSecond();
timeFromNextLogin = null;
}
}
<BUG>public Optional<Duration> getTimeLeft() {
</BUG>
if (endtimestamp == null && timeFromNextLogin == null) {
return Optional.empty();
}

if (timeFromNextLogin != null && endtimestamp == null) {
endtimestamp = Instant.now().plus(timeFromNextLogin, ChronoUnit.SECONDS).getEpochSecond();
timeFromNextLogin = null;
}
}
@Override public Optional<Duration> getRemainingTime() {
if (endtimestamp == null && timeFromNextLogin == null) {
return Optional.empty();
}
