|
@@ -71,7 +71,7 @@ static int hloop_process_timers(hloop_t* loop) {
|
|
|
heap_dequeue(&loop->timers);
|
|
heap_dequeue(&loop->timers);
|
|
|
if (timer->event_type == HEVENT_TYPE_TIMEOUT) {
|
|
if (timer->event_type == HEVENT_TYPE_TIMEOUT) {
|
|
|
while (timer->next_timeout <= now_hrtime) {
|
|
while (timer->next_timeout <= now_hrtime) {
|
|
|
- timer->next_timeout += ((htimeout_t*)timer)->timeout * 1000;
|
|
|
|
|
|
|
+ timer->next_timeout += (uint64_t)((htimeout_t*)timer)->timeout * 1000;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else if (timer->event_type == HEVENT_TYPE_PERIOD) {
|
|
else if (timer->event_type == HEVENT_TYPE_PERIOD) {
|
|
@@ -550,7 +550,7 @@ htimer_t* htimer_add_period(hloop_t* loop, htimer_cb cb,
|
|
|
timer->day = day;
|
|
timer->day = day;
|
|
|
timer->month = month;
|
|
timer->month = month;
|
|
|
timer->week = week;
|
|
timer->week = week;
|
|
|
- timer->next_timeout = cron_next_timeout(minute, hour, day, week, month) * 1000000;
|
|
|
|
|
|
|
+ timer->next_timeout = (uint64_t)cron_next_timeout(minute, hour, day, week, month) * 1000000;
|
|
|
heap_insert(&loop->timers, &timer->node);
|
|
heap_insert(&loop->timers, &timer->node);
|
|
|
EVENT_ADD(loop, timer, cb);
|
|
EVENT_ADD(loop, timer, cb);
|
|
|
loop->ntimers++;
|
|
loop->ntimers++;
|