update bar value
loop timer