Add sleep mode after 1000 loops.