Skip to content

Commit

Permalink
Improved loging when timer jobs overlap.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-iancu committed Nov 24, 2014
1 parent 12ff6f3 commit 4b9b183
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions timer.c
Expand Up @@ -314,8 +314,9 @@ static inline void timer_ticker(struct os_timer *timer_list, utime_t *drift)
for (t=timer_list;t; t=t->next){
if (j>=t->expires){
if (t->current_time) {
LM_WARN("timer task <%s> already schedualed for %d s, it may overlap..\n",
t->label,j);
LM_WARN("timer task <%s> already schedualed for %lld s"
" (now %d), it may overlap..\n",
t->label, t->current_time, j);
if (t->flags&TIMER_FLAG_SKIP_ON_DELAY) {
/* skip this execution of the timer handler */
t->expires = j + t->interval;
Expand Down Expand Up @@ -358,8 +359,8 @@ static inline void utimer_ticker(struct os_timer *utimer_list, utime_t *drift)
for ( t=utimer_list ; t ; t=t->next){
if (uj>=t->expires){
if (t->current_time) {
LM_WARN("utimer task <%s>%p already schedualed for %lld us, skipping..\n",
t->label,t,uj);
LM_WARN("utimer task <%s>%p already schedualed for %lld us (now %lld),"
" skipping..\n", t->label,t,t->current_time,uj);
if (t->flags&TIMER_FLAG_SKIP_ON_DELAY) {
/* skip this execution of the timer handler */
t->expires = uj + t->interval;
Expand Down

0 comments on commit 4b9b183

Please sign in to comment.