Unfortunately I do not possess skills of methods of testing of a code, well have not learnt
my method of testing is simple:
I come on lake into its most heat, I am there minutes 5 simply to catch all lags which is, then I try cast that
in a case in your code width safezone be similar ping which shows blizz ( GetNetStats() )
in my case I see a real delay a caste and it usually makes 2000-3000 ms at returned GetNetStats() 83ms

All that I can make it to remove 2 videos for 2 cases about that that occurs, if it is necessary