format duration ourselves