Added time check to __main__ routine.