Fix issue-1689

This commit is contained in:
Sowmya Ramapatruni 2021-08-02 13:52:43 -07:00
parent d343dbbd76
commit 58fae22708
2 changed files with 3 additions and 2 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()