added clock timer code