Timer

Open this example on Plunker and check the source code.

Further reading