integrate previous workflow states in currentPhaseStart, small refactoring of time_diff function