Implementing ping measurement functions.