I tried total_ticks but it even worst, as total_ticks store a floating point number, the firing rate is very frustrate.

Now I found the best approach for my project is set fps_max = 60 and fps_min = 40