Updated timer code.