20,741
edits
| Line 182: | Line 182: | ||
To solve it we need to force download every (60s - prevDownloadTime) or use a scheduler. But it's not really a big problem, it's easy to solve. We can also simply reduce the time between each download but keep the generation of 60 positions. | To solve it we need to force download every (60s - prevDownloadTime) or use a scheduler. But it's not really a big problem, it's easy to solve. We can also simply reduce the time between each download but keep the generation of 60 positions. | ||
My solution allow an auto regulation speed of the loop. For example if I have an ultra high speee connection the download() will take 2 secondes, but if I have an ultra low speed connection it could take 9~10 seconds. | |||
Instead of use an hard coded variable the script can adapt totally to the connection speed. | |||
* we should *never* iterate through the whole AI list in the main thread *never* | * we should *never* iterate through the whole AI list in the main thread *never* | ||