• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Measuring latency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Measuring latency


  • Subject: Measuring latency
  • From: Liwei <email@hidden>
  • Date: Sun, 19 Oct 2008 14:22:20 +0800

I've got another simple question.

I need to have a way to measure latency in my application. My idea is
to send a "ping" message, take note of the current time and when the
return message arrives, find out how much time has elapsed to get the
round trip time and divide by two. This may not be terribly accurate
but should be sufficient for my use.

However, I can't seem to find a method of getting timing down to the
millisecond level. As far as I can find, CFAbsoluteTimeGetCurrent() is
the most precise way to get the current time, but only up to a second,
which isn't very useful for network latencies.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Measuring latency
      • From: Peter Sichel <email@hidden>
    • Re: Measuring latency
      • From: Matt Slot <email@hidden>
    • Re: Measuring latency
      • From: Andreas Fink <email@hidden>
  • Prev by Date: Getting gateway address on an iPhone
  • Next by Date: Re: Measuring latency
  • Previous by thread: Getting gateway address on an iPhone
  • Next by thread: Re: Measuring latency
  • Index(es):
    • Date
    • Thread