Moved context switching in main loop
Problem: The context was set in the main loop just prior to the event offloading. This yielded the problem that it was not set correctly during determination of event durations thus picking the duration from wrong RNGs. Solution: Moved context switching prior to duration determination.
Showing with 4 additions and 4 deletions