1TIME(3C)                                                              TIME(3C)
2
3
4

NAME

6       time, ftime - get date and time
7

SYNOPSIS

9       long time(0)
10
11       long time(tloc)
12       long *tloc;
13
14       #include <sys/types.h>
15       #include <sys/timeb.h>
16       ftime(tp)
17       struct timeb *tp;
18

DESCRIPTION

20       These interfaces are obsoleted by gettimeofday(2).
21
22       Time  returns  the  time  since 00:00:00 GMT, Jan. 1, 1970, measured in
23       seconds.
24
25       If tloc is nonnull, the return value is also stored  in  the  place  to
26       which tloc points.
27
28       The  ftime  entry  fills  in a structure pointed to by its argument, as
29       defined by <sys/timeb.h>:
30
31       /* Copyright (C) 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
32          This file is part of the GNU C Library.
33
34          The GNU C Library is free software; you can redistribute it and/or
35          modify it under the terms of the GNU Lesser General Public
36          License as published by the Free Software Foundation; either
37          version 2.1 of the License, or (at your option) any later version.
38
39          The GNU C Library is distributed in the hope that it will be useful,
40          but WITHOUT ANY WARRANTY; without even the implied warranty of
41          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42          Lesser General Public License for more details.
43
44          You should have received a copy of the GNU Lesser General Public
45          License along with the GNU C Library; if not, see
46          <http://www.gnu.org/licenses/>.  */
47
48       #ifndef _SYS_TIMEB_H
49       #define _SYS_TIMEB_H1
50
51       #include <features.h>
52
53       #define __need_time_t
54       #include <time.h>
55
56
57       __BEGIN_DECLS
58
59       /* Structure returned by the `ftime' function.  */
60
61       struct timeb
62         {
63           time_t time;/* Seconds since epoch, as from `time'.  */
64           unsigned short int millitm;/* Additional milliseconds.  */
65           short int timezone;/* Minutes west of GMT.  */
66           short int dstflag;/* Nonzero if Daylight Savings Time used.  */
67         };
68
69       /* Fill in TIMEBUF with information about the current time.  */
70
71       extern int ftime (struct timeb *__timebuf);
72
73       __END_DECLS
74
75       #endif        /* sys/timeb.h */
76
77       The structure contains the time since the epoch in seconds, up to  1000
78       milliseconds of more-precise interval, the local time zone (measured in
79       minutes of time westward from Greenwich), and a flag that, if  nonzero,
80       indicates  that  Daylight Saving time applies locally during the appro‐
81       priate part of the year.
82

SEE ALSO

84       date(1), gettimeofday(2), settimeofday(2), ctime(3)
85
86
87
884th Berkeley Distribution         May 9, 1985                         TIME(3C)
Impressum