title: Accurate RTT for Ping for iOS
body: <p>I would like to implement a Ping application for iOS.</p>
  
  <p>I have researched and found that SimplePing is the Apple provided class that would be most useful for this purpose.</p>
  
  <p>I have also found this github repository, which has an implementation for ping:
  <a href="https://github.com/chrishulbert/SimplePingHelper" rel="nofollow">https://github.com/chrishulbert/SimplePingHelper</a>.</p>
  
  <p>My question now becomes what is the best way to capture a RTT for each ping?</p>
  
  <p>I have thought about using CACurrentMediaTime() prior to the package being send, and then again when it is received. In that particular git repo, it would happen in tapPing() and then take the difference in pingResult().</p>
  
  <p>My fear is that since this is a millisecond measurement, the UI or other processes could affect this timing, and thus I will get a slower measurement than if I were using a native Ping command.</p>
  
  <p>I am looking for advise on the best way to accomplish this task. </p>
  
  <p>Thanks!</p>