function timer of the server