I'm working on a similar code and I was having the same problem with accuracy using the wait command. I resolved the problem using the @datetime function to get the difference between two times. That ...
Is there a way to monitor in real time the data being transfered to my pc from the internet? The idea is to make a small script to monitor data transfered from the internet in KB or MB.