For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > February 2007 > layout of stat (2), time structure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author layout of stat (2), time structure
Bittweiler

2007-02-23, 7:10 pm

I know the layout of the stat struct is in the man pages but it
doesn't say what the layout of the time related structures are. i
know that st_atime, st_mtime, and st_ctime
are these within the time structure are is there other information
within the time structure.

I ask because I'm writing a common lisp interface to the stat function
so I need to know the layout of the time structure within the stat 2
().
Thanks in advance ;-)

Mark Rafn

2007-02-23, 7:10 pm

Bittweiler <daBittweiler@gmail.com> wrote:
>I know the layout of the stat struct is in the man pages but it
>doesn't say what the layout of the time related structures are.


There is no layout. It's a time_t, which is the number of seconds since the
epoch (1970-01-01 00:00:00 UTC).

>I ask because I'm writing a common lisp interface to the stat function
>so I need to know the layout of the time structure within the stat 2


See the man pages for ctime(), gmtime(), and localtime() for more
human-friendly representations.
--
Mark Rafn dagon@dagon.net <http://www.dagon.net/>
Beej Jorgensen

2007-02-23, 7:10 pm

In article <1172266952.820161.10080@q2g2000cwa.googlegroups.com>,
Bittweiler <daBittweiler@gmail.com> wrote:
>I know the layout of the stat struct is in the man pages but it
>doesn't say what the layout of the time related structures are. i
>know that st_atime, st_mtime, and st_ctime
>are these within the time structure are is there other information
>within the time structure.


time_t isn't a struct... it's probably an int of some sort, but might be
a float.

# time_t and clock_t shall be integer or real-floating types.

-Beej

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com