This article applies to:
This sample illustrates how to run trials for a specific amount of time (e.g., run as many trials as possible in 5 seconds).
The start time is determined before the TrialList object beginsto run trials, and the end time is set to a defined amount of time (i.e., 30 seconds after the start time). While the trials are running, script is used to determine if the block should be terminated. If the current time >= the end time, the script jumps to the end of the current trial, and the TrialList is terminated, ending the trials.
NOTE: TrialList is set to a large number of trials. Only the number of trials that can be run within the allotted time will take place.