Evolution of time preference by natural selection