Seth Woolley's Man Viewer

Manual for time - man 2 time

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

TIME(2)                    Linux Programmer's Manual                   TIME(2)



NAME
       time(1,2,n) - get time(1,2,n) in(1,8) seconds

SYNOPSIS
       #include <time.h>

       time_t time(1,2,n)(time_t *t);

DESCRIPTION
       time(1,2,n)  returns the time(1,2,n) since the Epoch (00:00:00 UTC, January 1, 1970),
       measured in(1,8) seconds.

       If t is non-NULL, the return value is also stored in(1,8) the memory pointed
       to by t.

RETURN VALUE
       On  success,  the value of time(1,2,n) in(1,8) seconds since the Epoch is returned.
       On error(8,n), ((time_t)-1) is returned, and errno is set(7,n,1 builtins) appropriately.

ERRORS
       EFAULT t points outside your accessible address space.

NOTES
       POSIX.1 defines seconds since the Epoch as a value to be interpreted as
       the number of seconds between a specified time(1,2,n) and the Epoch, according
       to a formula for conversion from UTC equivalent to  conversion  on  the
       nave  basis that leap seconds are ignored and all years divisible by 4
       are leap years.  This value is not the same as  the  actual  number  of
       seconds  between  the  time(1,2,n)  and the Epoch, because of leap seconds and
       because clocks are not required to be synchronised to a standard refer-
       ence.   The  intention  is that the interpretation of seconds since the
       Epoch values be consistent; see  POSIX.1  Annex  B  2.2.2  for  further
       rationale.

CONFORMING TO
       SVr4, SVID, POSIX, X/OPEN, BSD 4.3
       Under  BSD  4.3, this call is obsoleted by gettimeofday(2).  POSIX does
       not specify any error(8,n) conditions.

SEE ALSO
       date(1), gettimeofday(2), ctime(3), ftime(3)



Linux 2.0.30                      1997-09-09                           TIME(2)

References for this manual (incoming links)