fix use time calculation and optimize task picking