The method utilizes the WAIT command. If framerate and server tickrate are the exact same, "WAIT 2" waits exactly 1 game tick each time. In practice, all function times are multiples of 1 game tick. (Sentry firing speeds use multiples of 3 game ticks) Sometimes this can be different from the time used internally (like the 0.1s attack time for SMGs becoming 7 ticks or 0.105s in practice.)
Attack time testing: Find the largest even value for WAIT you can fit between a +attack and a -attack without it resulting in 2 shots. Divide value by 2 to get the attack time in game ticks, multiply number of ticks by 15 ms/tick to get it in milliseconds.
Reload time testing: Find the lowest even value for WAIT between a +reload and a +attack command that doesn't result in the attack interrupting the reload before it's fully completed. Divide value by 2 to get the reload time in game ticks, multiply number of ticks by 15 ms/tick to get it in milliseconds.