Revised time constraint test to write out to csv file