Proper calculation of imbalance cycles.  Also lets endParallelLoop thread sleep
Proper calculation of imbalance cycles.  Also lets endParallelLoop thread sleep

s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim