1TIME(2)                    Linux Programmer's Manual                   TIME(2)
2
3
4

NAME

6       time - get time in seconds
7

SYNOPSIS

9       #include <time.h>
10
11       time_t time(time_t *t);
12

DESCRIPTION

14       time()  returns  the  time  since  the  Epoch (00:00:00 UTC, January 1,
15       1970), measured in seconds.
16
17       If t is non-NULL, the return value is also stored in the memory pointed
18       to by t.
19

RETURN VALUE

21       On  success,  the value of time in seconds since the Epoch is returned.
22       On error, ((time_t)-1) is returned, and errno is set appropriately.
23

ERRORS

25       EFAULT t points outside your accessible address space.
26

NOTES

28       POSIX.1 defines seconds since the Epoch as a value to be interpreted as
29       the number of seconds between a specified time and the Epoch, according
30       to a formula for conversion from UTC equivalent to  conversion  on  the
31       naive  basis that leap seconds are ignored and all years divisible by 4
32       are leap years.  This value is not the same as  the  actual  number  of
33       seconds  between  the  time  and the Epoch, because of leap seconds and
34       because clocks are not required to be synchronised to a standard refer‐
35       ence.   The  intention  is that the interpretation of seconds since the
36       Epoch values be consistent; see  POSIX.1  Annex  B  2.2.2  for  further
37       rationale.
38

CONFORMING TO

40       SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX does not specify any error
41       conditions.
42

SEE ALSO

44       date(1), gettimeofday(2), ctime(3), ftime(3), time(7)
45
46
47
48Linux 2.0.30                      1997-09-09                           TIME(2)
Impressum