gettimeofday cost on intel?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Andrew Gallatin