class ZTicker
{
    private final ZTimer  timer;
    private final ZTicket ticket;

    public ZTicker()
    {
        timer = new ZTimer();
        ticket = new ZTicket();
    }

    ZTicker(Supplier<Long> clock)
    {
        timer = new ZTimer(clock);
        ticket = new ZTicket(clock);
    }

    public Ticket addTicket(long interval, TimerHandler handler, Object... args)
    {
        return ticket.add(interval, handler, args);
    }

    public Timer addTimer(long interval, TimerHandler handler, Object... args)
    {
        return timer.add(interval, handler, args);
    }

    public long timeout()
    {<FILL_FUNCTION_BODY>}

    public int execute()
    {
        return timer.execute() + ticket.execute();
    }
}

        long timer = this.timer.timeout();
        long ticket = this.ticket.timeout();
        if (timer < 0 || ticket < 0) {
            return Math.max(timer, ticket);
        }
        else {
            return Math.min(timer, ticket);
        }
    
<no_super_class>