class DetectorServiceImpl implements DetectorService {

    @Override
    public List<Detector> getLastUpdatedDetectors(long interval) {
        val now = DateUtil.now().toInstant();
        val fromDate = DateUtil.toUtcDateString((now.minus(interval, ChronoUnit.SECONDS)));
        return repository.findByMeta_DateLastUpdatedGreaterThan(fromDate);
    }

}