Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <time.h>
    time_t time( time_t *tloc );

Description:
    The time function determines the current calendar time and encodes it
    into the type  time_t.

    The time represents the time since January 1, 1970 Coordinated Universal
    Time (UTC) (formerly known as Greenwich Mean Time (GMT)).

    The time set on the computer with the DOS time command and the DOS date
    command reflects the local time.  The environment variable TZ is used to
    establish the time zone to which this local time applies.  See the
    section The TZ Environment Variable for a discussion of how to set the
    time zone.

Returns:
    The time function returns the current calendar time.  If tloc is not
    NULL, the current calendar time is also stored in the object pointed to
    by tloc.

Example:
    #include <stdio.h>
    #include <time.h>

    void main()
      {
        time_t time_of_day;

        time_of_day = time( NULL );
        printf( "It is now: %s", ctime( &time_of_day ) );
      }

    produces the following:

    It is now: Fri Dec 25 15:58:42 1987

Classification:
    ANSI, POSIX 1003.1

Systems:
    All, Netware

See Also:
    asctime, clock, ctime, difftime, gmtime, localtime, mktime, strftime,
    tzset

See Also: clock difftime

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson