Skip to content

Commit

Permalink
Small code beautification
Browse files Browse the repository at this point in the history
Related to 1d83a0c

(cherry picked from commit e455d00)
  • Loading branch information
bogdan-iancu committed Jul 4, 2023
1 parent 83bda7b commit e2a6372
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,14 +959,17 @@ The timer task was scheduled before a drift adjustement
_ijiffies = *ijiffies;
/* if we read from the queue after or while a drift was detecte
* -> take the drift value into consideration too */
_ijiffies_extra = (t->trigger_time > *ijiffies_drift_base) ? 0 : *ijiffies_drift;
_ijiffies_extra =
(t->trigger_time > *ijiffies_drift_base) ? 0 : *ijiffies_drift;

/* run the handler */
if (t->flags&TIMER_FLAG_IS_UTIMER) {

if (t->trigger_time<(_ijiffies-_ijiffies_extra-ITIMER_TICK) ) {
LM_WARN("utimer job <%s> has a %lld us delay in execution: trigger_time=%lld ijiffies=%lld ijiffies_extra=%lld\n",
t->label, _ijiffies-t->trigger_time-_ijiffies_extra, t->trigger_time, _ijiffies, _ijiffies_extra);
LM_WARN("utimer job <%s> has a %lld us delay in execution: "
"trigger_time=%lld ijiffies=%lld ijiffies_extra=%lld\n",
t->label, _ijiffies-t->trigger_time-_ijiffies_extra,
t->trigger_time, _ijiffies, _ijiffies_extra);
}

t->u.utimer_f( t->time , t->t_param);
Expand All @@ -975,8 +978,10 @@ The timer task was scheduled before a drift adjustement
} else {

if (t->trigger_time<(_ijiffies-_ijiffies_extra-ITIMER_TICK) ) {
LM_WARN("timer job <%s> has a %lld us delay in execution trigger_time=%lld ijiffies=%lld ijiffies_extra=%lld\n",
t->label, _ijiffies-t->trigger_time-_ijiffies_extra, t->trigger_time, _ijiffies, _ijiffies_extra);
LM_WARN("timer job <%s> has a %lld us delay in execution: "
"trigger_time=%lld ijiffies=%lld ijiffies_extra=%lld\n",
t->label, _ijiffies-t->trigger_time-_ijiffies_extra,
t->trigger_time, _ijiffies, _ijiffies_extra);
}

t->u.timer_f( (unsigned int)t->time , t->t_param);
Expand Down

0 comments on commit e2a6372

Please sign in to comment.