diff options
author | shennetsind <ind@henn.et> | 2013-07-26 09:59:30 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-26 09:59:30 -0300 |
commit | b23563de5f9abde73600f84aff1d24d9f3b53bc5 (patch) | |
tree | 21ed35a07c74c224957b888b12e387cdd3751561 /src/common/timer.c | |
parent | 583272234fc96da7911029cd3cad13a7fb386e9e (diff) | |
parent | e9e8914ebfa70c1c212d0a7d7173b6da9e0e5b60 (diff) | |
download | hercules-b23563de5f9abde73600f84aff1d24d9f3b53bc5.tar.gz hercules-b23563de5f9abde73600f84aff1d24d9f3b53bc5.tar.bz2 hercules-b23563de5f9abde73600f84aff1d24d9f3b53bc5.tar.xz hercules-b23563de5f9abde73600f84aff1d24d9f3b53bc5.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/common/timer.c')
-rw-r--r-- | src/common/timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/timer.c b/src/common/timer.c index 955a971c8..f019c6927 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -195,7 +195,7 @@ unsigned int timer_gettick(void) { /// Adds a timer to the timer_heap static void push_timer_heap(int tid) { BHEAP_ENSURE(timer_heap, 1, 256); - BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP); + BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap); } /*========================== @@ -322,9 +322,9 @@ int timer_settick(int tid, unsigned int tick) { return (int)tick;// nothing to do, already in propper position // pop and push adjusted timer - BHEAP_POPINDEX(timer_heap, i, DIFFTICK_MINTOPCMP); + BHEAP_POPINDEX(timer_heap, i, DIFFTICK_MINTOPCMP, swap); timer_data[tid].tick = tick; - BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP); + BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap); return (int)tick; } @@ -342,7 +342,7 @@ int do_timer(unsigned int tick) { break; // no more expired timers to process // remove timer - BHEAP_POP(timer_heap, DIFFTICK_MINTOPCMP); + BHEAP_POP(timer_heap, DIFFTICK_MINTOPCMP, swap); timer_data[tid].type |= TIMER_REMOVE_HEAP; if( timer_data[tid].func ) { |