code for timer bar