• 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: Filling in a struct timespec with the current date?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filling in a struct timespec with the current date?


  • Subject: Re: Filling in a struct timespec with the current date?
  • From: Eli Bach <email@hidden>
  • Date: Tue, 28 Jul 2009 21:21:47 -0700


On Jul 28, 2009, at 9:08 PM, Esteban Bodigami wrote:

i want the time in kilosecs...


Well, first you need to define what you mean by 'time in kilosecs'.

If you're ok with the time from Jan 1, 1970, you can use gettimeofday().

If it's from some other date/time, you need to calculate the difference between Jan 1, 1970 and the date you want, perhaps taking the current time zone into account. There are a variety of functions available to do this kind of calculation.

Once you have that, you just need to multiple that value by 1000.

Eli

_______________________________________________
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: Filling in a struct timespec with the current date?
      • From: Esteban Bodigami <email@hidden>
References: 
 >Filling in a struct timespec with the current date? (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)
 >Re: Filling in a struct timespec with the current date? (From: Esteban Bodigami <email@hidden>)

  • Prev by Date: Re: Filling in a struct timespec with the current date?
  • Next by Date: Re: Filling in a struct timespec with the current date?
  • Previous by thread: Re: Filling in a struct timespec with the current date?
  • Next by thread: Re: Filling in a struct timespec with the current date?
  • Index(es):
    • Date
    • Thread