class CooldownChecker {

    public boolean isCooldownExpired(UserSyncStatus userSyncStatus, Instant cooldownThresholdTime) {
        requireNonNull(userSyncStatus, "userSyncStatus is null");
        boolean cool;
        if (userSyncStatus.getLastStartedFullSync() != null) {
            cool = Instant.ofEpochMilli(userSyncStatus.getLastStartedFullSync().getStartTime()).isBefore(cooldownThresholdTime);
        }  else {
            cool = true;
        }
        if (LOGGER.isDebugEnabled()) {
            Stack stack = userSyncStatus.getStack();
            LOGGER.debug("Synchronization to Environment {} in Account {} {} been run since {}", stack.getEnvironmentCrn(),
                    stack.getAccountId(), cool ? "has not" : "has", DATE_TIME_FORMATTER.format(cooldownThresholdTime));
        }
        return cool;
    }

}