Moved the pause logic to above the call to trial_completed. This doesn't affect any timings but allows us to save the pause duration to file, which in turn can be used for providing an accurate trials QC outcome and allow users doing analysis to exclude paused trials. Also added a test for the pause and stop flag logic and fixed a couple of typos.
Moved the pause logic to above the call to trial_completed. This doesn't affect any timings but allows us to save the pause duration to file, which in turn can be used for providing an accurate trials QC outcome and allow users doing analysis to exclude paused trials. Also added a test for the pause and stop flag logic and fixed a couple of typos.