This is the timer model I built for the werewolves.io project a few months ago.
The entire project was built on the back of state.js and backbone.
What was interesting about this timer model, and most of the werewolves project actually, is that it formed part of
a distributed state machine. The timer state changes were streamed over websockets to each of the clients, and when
the server manipulated the timer, it would propagate to all connected browser tabs.
I also needed to be able to serialize the state to be able to set the initial data for each new load, and I also
had to make some considerations towards eventually storing the active game in something like redis, to survive