public void increment() {
        semaphore.take();
        time += 1;
        if (time % 100 > 59)
            time += 40;
        if (time % 10000 / 100 > 59)
            time += 4000;
        if (time > 235959)
            time -= 240000;

        output.showTime(time);
        alarm();
        semaphore.give();
    }