How do ticks, wait() and CPU cycles work in my bot's program?
A match runs in ticks, 20 a second. Your program runs once from the top and usually loops forever; each call to wait() ends the tick: your commands go out, the rest of the tick's CPU time is given up, and fresh readings come in. Each tick your CPU has a fixed number of cycles (512 in the compiled-language leagues, 256 in assembly), and every line of code costs some of them.