Delete redundant elapsed_since_signal from Batch timeout (#2567)
This commit is contained in:
parent
79b8390214
commit
23168af003
@ -325,7 +325,6 @@ impl TimerStruct {
|
|||||||
if self.batch_mode {
|
if self.batch_mode {
|
||||||
unsafe {
|
unsafe {
|
||||||
let elapsed = current_time().saturating_sub(self.tmout_start_time);
|
let elapsed = current_time().saturating_sub(self.tmout_start_time);
|
||||||
let elapsed_since_signal = current_time().saturating_sub(self.tmout_start_time);
|
|
||||||
// elapsed may be > than tmout in case of received but ingored signal
|
// elapsed may be > than tmout in case of received but ingored signal
|
||||||
if elapsed > self.exec_tmout
|
if elapsed > self.exec_tmout
|
||||||
|| self.exec_tmout.saturating_sub(elapsed) < self.avg_exec_time * self.avg_mul_k
|
|| self.exec_tmout.saturating_sub(elapsed) < self.avg_exec_time * self.avg_mul_k
|
||||||
@ -338,8 +337,7 @@ impl TimerStruct {
|
|||||||
self.executions = 0;
|
self.executions = 0;
|
||||||
}
|
}
|
||||||
// readjust K
|
// readjust K
|
||||||
if elapsed_since_signal > self.exec_tmout * self.avg_mul_k && self.avg_mul_k > 1
|
if elapsed > self.exec_tmout * self.avg_mul_k && self.avg_mul_k > 1 {
|
||||||
{
|
|
||||||
self.avg_mul_k -= 1;
|
self.avg_mul_k -= 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user