How long did it take for the earth to form into a hospitable place for life?