public long timeout()
    {
        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);
        }
    }
@Test
    public void testNoTicket()
    {
        assertThat(ticker.timeout(), is(-1L));
    }