Partial improve main time calculation