debounce state machine graph
Since this is a homework question, I'll just give you some hints to get you started, rather than a complete answer.

The key concept for using a synchronous state machine to measure time intervals is based on the implicit assumption that the state machine spends a certain minimum time in each state, and that time is the period of the clock.

Therefore, to measure a specific time interval, you need to figure out how many clock periods it is going to be, and then have that many states in your state machine that it sequences through. The elapsed time from the first state to the last state will be the required time interval.

The most efficient way to encode a large number of states is to use a binary counter. Is this enough to get you going?