fix calculate  interupted time problem