Added a time_print statement that will print every n seconds