Annotation of 42BSD/usr.lib/libU77/itime_.c, revision 1.1

1.1     ! root        1: /*
        !             2: char id_itime[] = "@(#)itime_.c        1.2";
        !             3:  *
        !             4:  * return the current time in numerical form
        !             5:  *
        !             6:  * calling sequence:
        !             7:  *     integer iarray(3)
        !             8:  *     call itime(iarray)
        !             9:  * where:
        !            10:  *     iarray will receive the current time; hour, min, sec.
        !            11:  */
        !            12: 
        !            13: #include <sys/types.h>
        !            14: #include <sys/time.h>
        !            15: 
        !            16: itime_(iar)
        !            17: struct { long ihr; long imin; long isec; } *iar;
        !            18: {
        !            19:        struct tm *localtime(), *lclt;
        !            20:        long int time(), t;
        !            21: 
        !            22:        t = time(0);
        !            23:        lclt = localtime(&t);
        !            24:        iar->ihr = lclt->tm_hour;
        !            25:        iar->imin = lclt->tm_min;
        !            26:        iar->isec = lclt->tm_sec;
        !            27: }

unix.superglobalmegacorp.com

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