Where can I find the implementation of "time.h"?

Where can I find the implementation of time.h in the standard C library, i.e. time.c ?

I tried using Google Code Search time.c Is the implementation in the Linux kernel?

+4
source share
5 answers

time.h is the header from the C standard library.

You will find implementations of the various functions that this header provides in the library implementation from your system. For example, the implementation of the difftime function in libc used for NetBSD can be found in src / lib / libc / time / difftime.c .

+5
source

You can find the implementation in the GNU libc library. There is more than one time.c. file Each function (in a first approximation) lives in its own compilation unit.

+1
source

Are you really looking for a C implementation in the standard library? Each compiler and OS usually have their own implementation (only headers are relatively standard).

You can see instructions for downloading sources for GNU C here: http://www.gnu.org/software/libc/resources.html

+1
source

time.h is the standard C header, so it describes the functions from the standard C library with which it came. For example, GNU libc

0
source

Source: https://habr.com/ru/post/1306793/


All Articles