* Schedule callout when we will have required tokens. */
| 647 | * Schedule callout when we will have required tokens. |
| 648 | */ |
| 649 | static void |
| 650 | ng_car_schedule(struct hookinfo *hinfo) |
| 651 | { |
| 652 | int delay; |
| 653 | |
| 654 | delay = (-(hinfo->tc)) * hz * 8 / hinfo->conf.cir + 1; |
| 655 | |
| 656 | ng_callout(&hinfo->q_callout, NG_HOOK_NODE(hinfo->hook), hinfo->hook, |
| 657 | delay, &ng_car_q_event, NULL, 0); |
| 658 | } |
| 659 | |
| 660 | /* |
| 661 | * Queue processing callout handler. |
no test coverage detected