Timer function and text align