kernel/timer: Optimise apply_slack() for size and speed - credits Sarcastillo