diff options
Diffstat (limited to 'lib/wheel.c')
| -rw-r--r-- | lib/wheel.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/wheel.c b/lib/wheel.c index fe53dea299..f273a29262 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -13,10 +13,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING; if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301 USA + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "zebra.h" #include "linklist.h" @@ -60,9 +59,8 @@ wheel_timer_thread (struct thread *t) slots_to_skip++; wheel->slots_to_skip = slots_to_skip; - THREAD_TIMER_MSEC_ON (wheel->master, wheel->timer, - wheel_timer_thread, wheel, - wheel->nexttime * slots_to_skip); + thread_add_timer_msec(wheel->master, wheel_timer_thread, wheel, + wheel->nexttime * slots_to_skip, &wheel->timer); return 0; } @@ -91,9 +89,8 @@ wheel_init (struct thread_master *master, int period, size_t slots, for (i = 0; i < slots; i++) wheel->wheel_slot_lists[i] = list_new (); - THREAD_TIMER_MSEC_ON (wheel->master, wheel->timer, - wheel_timer_thread, wheel, - wheel->nexttime); + thread_add_timer_msec(wheel->master, wheel_timer_thread, wheel, + wheel->nexttime, &wheel->timer); return wheel; } @@ -124,9 +121,8 @@ int wheel_start (struct timer_wheel *wheel) { if (!wheel->timer) - THREAD_TIMER_MSEC_ON (wheel->master, wheel->timer, - wheel_timer_thread, wheel, - wheel->nexttime); + thread_add_timer_msec(wheel->master, wheel_timer_thread, wheel, + wheel->nexttime, &wheel->timer); return 0; } |
