summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-03-28 19:07:40 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-03-28 19:07:40 +0300
commitbb8c28567882ed4de909468709aee57a55e82b3f (patch)
tree0340210c043f4a5a2b9ba49712b6969895a3d68e
parentbaf63dfe74801024ba23d04eff5aff6340c8dffd (diff)
downloadunit-bb8c28567882ed4de909468709aee57a55e82b3f.tar.gz
unit-bb8c28567882ed4de909468709aee57a55e82b3f.tar.bz2
Using type for nxt_msec_diff().
-rw-r--r--src/nxt_timer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nxt_timer.c b/src/nxt_timer.c
index c1a26b86..f56ddeb6 100644
--- a/src/nxt_timer.c
+++ b/src/nxt_timer.c
@@ -241,7 +241,8 @@ nxt_timer_changes_commit(nxt_event_engine_t *engine)
nxt_msec_t
nxt_timer_find(nxt_event_engine_t *engine)
{
- int32_t time;
+ int32_t delta;
+ nxt_msec_t time;
nxt_timer_t *timer;
nxt_timers_t *timers;
nxt_rbtree_t *tree;
@@ -273,12 +274,12 @@ nxt_timer_find(nxt_event_engine_t *engine)
time = timer->time;
timers->minimum = time;
- nxt_debug(timer->task, "timer found minimum: %D:%M",
+ nxt_debug(timer->task, "timer found minimum: %M:%M",
time, timers->now);
- time = nxt_msec_diff(time, timers->now);
+ delta = nxt_msec_diff(time, timers->now);
- return (nxt_msec_t) nxt_max(time, 0);
+ return (nxt_msec_t) nxt_max(delta, 0);
}
}