fix spendTime calculate