Every frame has a frame.time_delta. If that is larger than some TBD value then that's it, the gap you're looking for.
frame.time_delta