|
|
#include <sys/types.h> #include <time.h>time_t time (tloc) time_t *tloc;
#include <sys/types.h> #include <sys/timeb.h> #include <time.h>void ftime (tp) struct timeb *tp;
If tloc is nonzero, the return value is also stored in the location to which tloc points.
ftime returns the time in the timeb structure as follows:
struct timeb { time_t time; /* time, seconds since the epoch */ unsigned short millitm;/* 1000 msec of additional accuracy */ short timezone; /* timezone, minutes west of GMT */ short dstflag; /* daylight savings */ };The
timezone
member is a system default timezone and
not the value of the TZ environment value. This
structure contains the time since the epoch in seconds, up to
1000 milliseconds of a more-precise interval, the local time zone
(measured in minutes of time westward from Greenwich), and a flag
that, if nonzero, indicates that Daylight Savings Time applies
locally during the appropriate part of the year.
The time system call fails and its actions are undefined if tloc points to an illegal address. ftime fails if tp points to an illegal address. For either failure, errno is set to EFAULT.
X/Open Portability Guide, Issue 3, 1989
;
ANSI X3.159-1989 Programming Language -- C
;
Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2)
;
IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1)
;
and
NIST FIPS 151-1
.
ftime is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.