• 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
gettimeofday cost on intel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettimeofday cost on intel?


  • Subject: gettimeofday cost on intel?
  • From: Andrew Gallatin <email@hidden>
  • Date: Tue, 9 May 2006 11:11:21 -0400 (EDT)

I need a cheap way to measure events with at least a 10ms granularity
that is monotonically increasing, regardless of the CPU my thread has
been scheduled upon.  Can I count on gettimeofday() using the commpage
(and, hence, being very cheap) on x86 like it is on ppc?

On some OSes, gettimeofday() will always, or often result in
an expensive syscall, so we mmap a counter out of our driver
which is incremented every clock tick.  If MacOSX's gettimeofday()
can be counted upon to be cheap, I can avoid this effort on MacOSX.

Thanks,

Drew

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: gettimeofday cost on intel?
      • From: Matt Watson <email@hidden>
  • Prev by Date: Re: How to use VARIANT Structure of C on MAC OSX and XCODE
  • Next by Date: Re: gettimeofday cost on intel?
  • Previous by thread: Re: How to use VARIANT Structure of C on MAC OSX and XCODE
  • Next by thread: Re: gettimeofday cost on intel?
  • Index(es):
    • Date
    • Thread