• 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
Re: How to get clock ticks for sb_timeo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get clock ticks for sb_timeo


  • Subject: Re: How to get clock ticks for sb_timeo
  • From: Bernd Löhr <email@hidden>
  • Date: Mon, 24 Mar 2003 12:07:14 +0100

Wade, I'm in the kernel - so I cannot call sysctl. Would it be safe to declare extern int hz? It seems to work (my kext loads), though. I would prefer a function call, of course.


Am Montag, 24.03.03 um 10:20 Uhr schrieb Wade Tregaskis:

I need to set the timeout value so_rcv.sb_timeo (for sosend / soreceive) in my kernel socket. Can anybody tell me how to obtain the correct value for the clock ticks to compute the timeout?

One way I can think of is sysctl. You'll have to dig through header files to find the right definitions (the man pages are simply wrong), but they are there - look under the kern branch, for clockrate. It returns a struct, in which you'll find the clock frequency, and the number of microseconds per clock tick. They should be what you need.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: How to get clock ticks for sb_timeo
  • Next by Date: timing out an OTSnd
  • Previous by thread: Re: How to get clock ticks for sb_timeo
  • Next by thread: timing out an OTSnd
  • Index(es):
    • Date
    • Thread