• 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: Getting current time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting current time


  • Subject: Re: Getting current time
  • From: Geoffrey Schmit <email@hidden>
  • Date: Fri, 7 Jan 2005 15:33:51 -0600

On 07/01/2005 at 11:45 AM, Matt Jaffa <email@hidden> wrote:

> I was wondering if there is a way to get the current time of the
> day it is on the system from within a kernel extension I am writing.
> I realize that the gettimeofday system call is only available outside
> of the kernel?
> Any way of doing this?

The clock_get_calendar_value function declared in kern/clock.h may do
what you want.  If I remember correctly, it returns the seconds and
nanoseconds since 1970.

geoff
--
Geoffrey Schmit
Senior Software Engineer
National Instruments
email@hidden
www.ni.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Getting current time
  • Next by Date: Re: Getting current time
  • Previous by thread: Re: Getting current time
  • Next by thread: Communicating from kernel extension to application?
  • Index(es):
    • Date
    • Thread