pingWait needs set before the ping function is called the first time