Re: Filling in a struct timespec with the current date?
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