Is this a program logic question, or C language related?
You need a timebase, not neccessarily using a crystal, but generating an interrupt every second.
Then you need some buttons and a simple menu to edit the preset, and a logic to start counting down from that preset.
Do you have a working PCB/skeleton source ready (LCD initialization, timer int, query buttons etc.)?
Do you only want to use rotary encoder or also pushbuttons? Only using rotary encoder is also possible I think, if you work the encoder, simply time will become increased (again).
Do you have an accurate millis() call? (Is the Arduino IDE supporting this target?)
If so, when starting, take the number of seconds to go, multiply by 1000L (long) and add millis(). Store it in a long variable callex targetTime.The number of seconds left is then (targetTime - millis())/1000.
Check the counter at least 10 times a second to get a smoothly counting timer display.
Have you tried to draw a flow chart, rather thinking of a state machine, than device dependent "events processing"?
I tried to read your program, but I do not find something that starts producing "timer events" regularily.
You could start such an interrupt source anyway, only use it to take action if the "timer becomes active", otherwise do nothing.
It's interesting system, this event manager, reminds me on the windows loop (visual Studio).
I'd normally use 16F PICs, where it is much more simple to set up relevant interrupts.
But also examining this forum.
A state machine basically is a "finite state machine", the number of possible conditions is limited, and it traverses through them according to conditions. It really helps to draw it up on paper. There is a PDF about them, rather talking about digital logic, but it's the same for program logic.