Tick generator using interval.

Close #1166.
*using the specified interval.