Fixed error in time_intervals function

The return was inside of the while loop, causing it to only return one
spike per scope/channel combination