Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ time(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 time(S)                        6 January 1993                        time(S)


 Name

    time, ftime - return time

 Syntax


    cc  . . .  -lc


    #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;


 Description

    The time system call returns the value of time in seconds since 00:00:00
    Greenwich Mean Time (GMT), January 1, 1970.

    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.

 Diagnostics

    Upon successful completion, time returns the value of time.  Otherwise, a
    value of -1 is returned, and errno is set to indicate the error.

    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.

 See Also

    ctime(S), difftime(S), mktime(S), nlcxtime(S), stime(S), times(S)

 Standards conformance

    time is conformant with:
    AT&T SVID Issue 2;
    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.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026