Client and server share an updatable object called context C, initially set to empty object {}. Server then defines function C.timer(interval), and client defines function C.deep.tick(reason). Once 'Start' below is clicked, client calls C.timer(2000) and server starts to call client's C.deep.tick('tick'). Client reports ticks to the bottom of this document.

Look at the server source, and the context source.

Qunit tests

Start the timer.  Stop the timer.