timeratio control replace time control,optimize code