@Test public void test() { assertThat(RollupService.millisUntilNextRollup(15000)).isEqualTo(55000); assertThat(RollupService.millisUntilNextRollup(30000)).isEqualTo(40000); assertThat(RollupService.millisUntilNextRollup(45000)).isEqualTo(25000); assertThat(RollupService.millisUntilNextRollup(60000)).isEqualTo(10000); }
@VisibleForTesting static long millisUntilNextRollup(long currentTimeMillis) { return 60000 - (currentTimeMillis - 10000) % 60000; }
RollupService implements Runnable { @VisibleForTesting static long millisUntilNextRollup(long currentTimeMillis) { return 60000 - (currentTimeMillis - 10000) % 60000; } }
RollupService implements Runnable { @VisibleForTesting static long millisUntilNextRollup(long currentTimeMillis) { return 60000 - (currentTimeMillis - 10000) % 60000; } RollupService(ActiveAgentDao activeAgentDao, AggregateDao aggregateDao,
            GaugeValueDao gaugeValueDao, SyntheticResultDao syntheticResultDao,
            CentralAlertingService centralAlertingService, Clock clock); }
RollupService implements Runnable { @VisibleForTesting static long millisUntilNextRollup(long currentTimeMillis) { return 60000 - (currentTimeMillis - 10000) % 60000; } RollupService(ActiveAgentDao activeAgentDao, AggregateDao aggregateDao,
            GaugeValueDao gaugeValueDao, SyntheticResultDao syntheticResultDao,
            CentralAlertingService centralAlertingService, Clock clock); @Override void run(); }
RollupService implements Runnable { @VisibleForTesting static long millisUntilNextRollup(long currentTimeMillis) { return 60000 - (currentTimeMillis - 10000) % 60000; } RollupService(ActiveAgentDao activeAgentDao, AggregateDao aggregateDao,
            GaugeValueDao gaugeValueDao, SyntheticResultDao syntheticResultDao,
            CentralAlertingService centralAlertingService, Clock clock); @Override void run();  }