Updated timer code example.