Isn't it sleep for while no message received and then pause for 5? It was cribbed from above.