How did you decide on a divorce when you have children?

Is it equal custody? How was it decided who got who when? When did you know it was time ?