* time_t ???
@ 2004-05-14 9:40 behzad chenaghlou
2004-05-14 9:29 ` Christoph Bussenius
0 siblings, 1 reply; 3+ messages in thread
From: behzad chenaghlou @ 2004-05-14 9:40 UTC (permalink / raw)
To: linux-c-programming
Hi everybody
What is exactly the "time_t" struct?
I mean how it retains the calender?
Where can I find a reference
best regards
behzad
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: time_t ???
2004-05-14 9:40 time_t ??? behzad chenaghlou
@ 2004-05-14 9:29 ` Christoph Bussenius
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Bussenius @ 2004-05-14 9:29 UTC (permalink / raw)
To: linux-c-programming
On Fri, May 14, 2004 at 07:40:51PM +1000, behzad chenaghlou wrote:
> What is exactly the "time_t" struct?
time_t isn't a struct, it is merely a bare int, as far as I know.
However, there is a struct timeval:
struct timeval {
long tv_sec;
long tv_usec;
};
Regards,
Christoph
--
``There's no dark side of the moon, really
Matter of fact, it's all dark''
--Pink Floyd
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: time_t ???
@ 2004-05-14 10:44 Sanjay Kumar, Noida
0 siblings, 0 replies; 3+ messages in thread
From: Sanjay Kumar, Noida @ 2004-05-14 10:44 UTC (permalink / raw)
To: behzad chenaghlou, linux-c-programming
actually time_t is "long" .
in linux kernel the wall time is defined in kernel/timer.c as
struct timespec xtime;
where timespec structure is:
struct timespec
{
time_t tv_sec;
long tv_nsec;
};
here xtime.tv_sec is used to store the number of seconds that have
passed after january 1, 1970.
The walltime is defined relative to this.
whereas xtime.tv_nsec gives the number of nanoseconds that have
elapsed in the last second.
regards
sanjay
-----Original Message-----
From: linux-c-programming-owner@vger.kernel.org
[mailto:linux-c-programming-owner@vger.kernel.org]On Behalf Of behzad
chenaghlou
Sent: Friday, May 14, 2004 3:11 PM
To: linux-c-programming@vger.kernel.org
Subject: time_t ???
Hi everybody
What is exactly the "time_t" struct?
I mean how it retains the calender?
Where can I find a reference
best regards
behzad
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe
linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Disclaimer:
This message and any attachment(s) contained here are information that is
confidential,proprietary to HCL Technologies and its customers, privileged
or otherwise protected by law.The information is solely intended for the
individual or the entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read, forward,
print,retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-14 10:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-14 9:40 time_t ??? behzad chenaghlou
2004-05-14 9:29 ` Christoph Bussenius
-- strict thread matches above, loose matches on Subject: below --
2004-05-14 10:44 Sanjay Kumar, Noida
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).