Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettimeofday(2)

stime(2)

clock(3)



  time(2)                             CLIX                             time(2)



  NAME

    time - Gets time

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <time.h>

    time_t time(
      time_t *tloc );

  PARAMETERS

    tloc   Points to the location where the return value is stored.  When this
           parameter is a NULL pointer, no value is stored.

  DESCRIPTION

    The time() function returns the time in seconds since the Epoch.  The
    Epoch is referenced to 00:00:00 GMT (Greenwich Mean Time) January 1, 1970.

  EXAMPLES

    time_t seconds_since_epoch;
    if (time(&seconds_since_epoch) == (time_t)-1)
         perror("time failed");


  RETURN VALUES

    On successful completion, time returns the value of time in seconds since
    00:00:00 GMT, January 1, 1970. If tloc is non-zero, the return value is
    also   stored in the location to which tloc points. On successful
    completion, time() returns the value of time in seconds regardless of
    whether tloc is non-NULL. Otherwise, the value ((time_t) - 1) is returned
    and errno is set to indicate the error.

  ERRORS

    This function fails if the following is true:

    [EFAULT]   The tloc parameter points to an inaccessible address.

  RELATED INFORMATION

    Functions:  gettimeofday(2), stime(2), clock(3)




  2/94 - Intergraph Corporation                                              1




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