change the units of pause_per_second to milliseconds.