update timer code