annotate lib/gethrxtime.h @ 10690:01f3623813da

Split winsock.c into many smaller files. * lib/close.c: Add _gl_close_fd_maybe_socket from winsock.c. * lib/accept.c: New file, based on winsock.c. * lib/bind.c: New file, based on winsock.c. * lib/connect.c: New file, based on winsock.c. * lib/getpeername.c: New file, based on winsock.c. * lib/getsockname.c: New file, based on winsock.c. * lib/getsockopt.c: New file, based on winsock.c. * lib/ioctl.c: New file, based on winsock.c. * lib/listen.c: New file, based on winsock.c. * lib/recv.c: New file, based on winsock.c. * lib/recvfrom.c: New file, based on winsock.c. * lib/send.c: New file, based on winsock.c. * lib/sendto.c: New file, based on winsock.c. * lib/setsockopt.c: New file, based on winsock.c. * lib/shutdown.c: New file, based on winsock.c. * lib/socket.c: New file, based on winsock.c. * lib/w32sock.h: New file, based on winsock.c. * lib/winsock.c: Remove file. * modules/accept: Likewise. * modules/bind: Likewise. * modules/connect: Likewise. * modules/getpeername: Likewise. * modules/getsockname: Likewise. * modules/getsockopt: Likewise. * modules/ioctl: Likewise. * modules/listen: Likewise. * modules/recv: Likewise. * modules/recvfrom: Likewise. * modules/send: Likewise. * modules/sendto: Likewise. * modules/setsockopt: Likewise. * modules/shutdown: Likewise. * modules/socket: Use socket.c instead of winsock.c. * modules/sys_socket: Remove (unneeded?) dependency on winsock.c. * doc/posix-functions/accept.texi: Doc fix. * doc/posix-functions/bind.texi: Doc fix. * doc/posix-functions/close.texi: Doc fix. * doc/posix-functions/connect.texi: Doc fix. * doc/posix-functions/getpeername.texi: Doc fix. * doc/posix-functions/getsockname.texi: Doc fix. * doc/posix-functions/getsockopt.texi: Doc fix. * doc/posix-functions/ioctl.texi: Doc fix. * doc/posix-functions/listen.texi: Doc fix. * doc/posix-functions/recv.texi: Doc fix. * doc/posix-functions/recvfrom.texi: Doc fix. * doc/posix-functions/send.texi: Doc fix. * doc/posix-functions/sendto.texi: Doc fix. * doc/posix-functions/setsockopt.texi: Doc fix. * doc/posix-functions/shutdown.texi: Doc fix. * doc/posix-functions/socket.texi: Doc fix.
author Simon Josefsson <simon@josefsson.org>
date Tue, 21 Oct 2008 12:17:19 +0200
parents bbbbbf4cd1c5
children b5e42ef33b49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
1 /* gethrxtime -- get high resolution real time
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3 Copyright (C) 2005 Free Software Foundation, Inc.
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6449
diff changeset
5 This program is free software: you can redistribute it and/or modify
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6449
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6449
diff changeset
8 (at your option) any later version.
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
13 GNU General Public License for more details.
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
14
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6449
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
17
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
18 /* Written by Paul Eggert. */
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
19
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
20 #ifndef GETHRXTIME_H_
5851
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
21 # define GETHRXTIME_H_ 1
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
22
5851
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
23 # include "xtime.h"
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
24
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
25 /* Get the current time, as a count of the number of nanoseconds since
6449
232d8dc8525f * modules/gethrxtime (Depends-on): Add gettime.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5851
diff changeset
26 an arbitrary epoch (e.g., the system boot time). Prefer a
232d8dc8525f * modules/gethrxtime (Depends-on): Add gettime.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5851
diff changeset
27 high-resolution clock that is not subject to resetting or
232d8dc8525f * modules/gethrxtime (Depends-on): Add gettime.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5851
diff changeset
28 drifting. */
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
29
5851
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
30 # if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
31 # include <time.h>
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
32 static inline xtime_t gethrxtime (void) { return gethrtime (); }
5851
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
33 # else
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
34 xtime_t gethrxtime (void);
5851
d39411e1c5e6 Sync from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5848
diff changeset
35 # endif
5662
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
36
42df9db003cc * modules/gethrxtime: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37 #endif