fix accuracy problem for timer