Tick generator using interval.

Close #1166.
Again shouldn't be too hard to create tests for.  Just think about a bunch of edge cases.