Now
MAIN commitmail json YAML
src/distrib/sets/lists/comp/mi@1.2064
/
diff
/
nxr@1.2064
src/include/time.h@1.47 / diff / nxr@1.47
src/lib/libc/gen/Makefile.inc@1.196 / diff / nxr@1.196
src/lib/libc/gen/timespec_get.3@1.1 / diff / nxr@1.1
src/lib/libc/gen/timespec_get.c@1.1 / diff / nxr@1.1
src/include/time.h@1.47 / diff / nxr@1.47
src/lib/libc/gen/Makefile.inc@1.196 / diff / nxr@1.196
src/lib/libc/gen/timespec_get.3@1.1 / diff / nxr@1.1
src/lib/libc/gen/timespec_get.c@1.1 / diff / nxr@1.1
Add timespec_get(3) in <time.h> and enable unconditionally struct timespec
These changes conforms to the C11 standard
References:
- 7.27.1/3 Components of time (struct timespec)
- 7.27.2.5 The timespec_get function
According to ISO/IEC 9899:201x (draft) <time.h> defines the timespec
structure and declares the timespec_get(3) function with TIME_UTC
definition.
According to a C++17 standard draft <ctime> offers the same interface in
the std:: namespace.
The timespec_get function modifies the timespec object pointed by ts
to hold the current calendar time in the given base. The standard notes
only the TIME_UTC base with implementation defined value, set it to 1
as zero is reserved for error handling. Once operation was successful this
function returns passed base, otherwise exits with zero.
The timespec struct was already part of the POSIX standard in <time.h>.
Enable this interface unconditionally in the header to allow to use it
in a code prior C11 and C++17 as an extension.
Review notes from <christos>
These changes conforms to the C11 standard
References:
- 7.27.1/3 Components of time (struct timespec)
- 7.27.2.5 The timespec_get function
According to ISO/IEC 9899:201x (draft) <time.h> defines the timespec
structure and declares the timespec_get(3) function with TIME_UTC
definition.
According to a C++17 standard draft <ctime> offers the same interface in
the std:: namespace.
The timespec_get function modifies the timespec object pointed by ts
to hold the current calendar time in the given base. The standard notes
only the TIME_UTC base with implementation defined value, set it to 1
as zero is reserved for error handling. Once operation was successful this
function returns passed base, otherwise exits with zero.
The timespec struct was already part of the POSIX standard in <time.h>.
Enable this interface unconditionally in the header to allow to use it
in a code prior C11 and C++17 as an extension.
Review notes from <christos>