How to save time in .txt file when the object is Detected in Video using YoloV5

Linking here to connect back to the original thread where this is actively being addressed/resolved.

I’m doing this so that others that find each post realize these are connected threads, rather than separate inquiries: