lkml.org 
[lkml]   [1996]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: struct timespec
According to POSIX.1 Section 14.1.1, "A time value structure timespec
specifies a single time value and includes at least the following
members:
member type member name description
time_t tv_sec seconds
long tv_usec nanosections

Therefore, the definition in linux/time.h is correct and the pthreads
definition is incorrect. I doubt Linus will accept this patch, since
it breaks POSIX compatibility.

Enjoy!

-derek

> Last week, I found out, that timespec is declared as
> struct timespec {
> long tv_sec; /* seconds */
> long tv_nsec; /* nanoseconds */
> };
>
> However pthreads declares it in its own header files as
> struct timespec {
> long ts_sec; /* seconds */
> long ts_nsec; /* nanoseconds */
> };
> which seems a little bit more intuitive to me.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.066 / U:9.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site