Fixes GH-1689

* 'master' of https://github.com/sowmyaramapatruni/zeek:
  Fix issue-1689
This commit is contained in:
Johanna Amann 2021-08-03 10:22:43 +01:00
commit ec6b954499
4 changed files with 10 additions and 3 deletions

View file

@ -885,9 +885,10 @@ double calc_next_rotate(double current, double interval, double base)
double startofday = mktime(&t);
// current < startofday + base + i * interval <= current + interval
return startofday + base +
double delta_t = startofday + base +
ceil((current - startofday - base) / interval) * interval -
current;
return delta_t > 0.0 ? delta_t: interval;
}
void terminate_processing()