How much time needs a 255.255.255.0 loop? Maybe we have to improve our code to decrease this time. e.g. use only 2 pings, instead of 4.