mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Fix issue-1689
This commit is contained in:
parent
d343dbbd76
commit
58fae22708
2 changed files with 3 additions and 2 deletions
|
@ -152,7 +152,7 @@ void PQ_TimerMgr::Expire()
|
|||
int PQ_TimerMgr::DoAdvance(double new_t, int max_expire)
|
||||
{
|
||||
Timer* timer = Top();
|
||||
for ( num_expired = 0; (num_expired < max_expire || max_expire == 0) &&
|
||||
for ( num_expired = 0; (num_expired < max_expire ) &&
|
||||
timer && timer->Time() <= new_t; ++num_expired )
|
||||
{
|
||||
last_timestamp = timer->Time();
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue