Annotation of 42BSD/lib/libc/gen/time.c, revision 1.1

1.1     ! root        1: /*     time.c  4.2     83/02/27        */
        !             2: 
        !             3: /*
        !             4:  * Backwards compatible time call.
        !             5:  */
        !             6: #include <sys/types.h>
        !             7: #include <sys/time.h>
        !             8: 
        !             9: time_t
        !            10: time(t)
        !            11:        time_t *t;
        !            12: {
        !            13:        struct timeval tt;
        !            14: 
        !            15:        if (gettimeofday(&tt, (struct timezone *)0) < 0)
        !            16:                return (-1);
        !            17:        if (t)
        !            18:                *t = tt.tv_sec;
        !            19:        return (tt.tv_sec);
        !            20: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.