fix(change casts) : cast to float before

cast count, last_time to float before their usage.