function for calculating the experiment length
need cfg as output
cfg as processStims output, and experiment length