While downloading the files from the criminal server, Elliot realized that the server cuts him off if he is connected for longer than 15 seconds continuously. Help Elliot, optimize his code and reduce the time it takes to download all the files.
Use perf_counter()
to measure the time it takes to execute the entire code. Reduce the sleep delay time to 2 seconds, if the code exceeds the 15-second threshold.
Print the execution time at the end in the following format:
The code took X seconds to run.