For instance, I have an IP camera connected to my system. The normal loading time of the camera is around 2 seconds but sometimes the camera just takes too long to get a load, like 100 seconds or so. I want my script to wait for like 5 seconds; if camera loading is successful, read the frame and process it. But if the camera takes more than 5 seconds to load, just skip to the next part of the script. Any help would be much appreciated in this regard. Thanks