Where can I find the implementation of “time.h”?

后端 未结 5 901
不知归路
不知归路 2020-12-20 22:04

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

I tried with Google Code Search time.c Is the implementation in th

相关标签:
5条回答
  • 2020-12-20 22:31

    For GNU libc, see http://sourceware.org/git/?p=glibc.git;a=tree;f=time;h=c950c5d4dd90541e8f3c7e1649fcde4aead989bb;hb=master

    0 讨论(0)
  • 2020-12-20 22:33

    Are you actually looking for the implementation of C in the standard library? Each compiler and OS typically comes with their own implementation (just the headers are relatively standard).

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

    0 讨论(0)
  • 2020-12-20 22:39

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

    0 讨论(0)
  • 2020-12-20 22:42

    You can find an implementation in the GNU libc library. There isn't a single time.c file. Each function (to a first approximation) lives in its own compilation unit.

    0 讨论(0)
  • 2020-12-20 22:49

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

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

    0 讨论(0)
提交回复
热议问题