Annotation of 43BSDTahoe/usr.lib/libU77/itime_.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1980 Regents of the University of California.
                      3:  * All rights reserved.  The Berkeley software License Agreement
                      4:  * specifies the terms and conditions for redistribution.
                      5:  *
                      6:  *     @(#)itime_.c    5.1     6/7/85
                      7:  */
                      8: 
                      9: /*
                     10:  * return the current time in numerical form
                     11:  *
                     12:  * calling sequence:
                     13:  *     integer iarray(3)
                     14:  *     call itime(iarray)
                     15:  * where:
                     16:  *     iarray will receive the current time; hour, min, sec.
                     17:  */
                     18: 
                     19: #include <sys/types.h>
                     20: #include <sys/time.h>
                     21: 
                     22: itime_(iar)
                     23: struct { long ihr; long imin; long isec; } *iar;
                     24: {
                     25:        struct tm *localtime(), *lclt;
                     26:        long int time(), t;
                     27: 
                     28:        t = time(0);
                     29:        lclt = localtime(&t);
                     30:        iar->ihr = lclt->tm_hour;
                     31:        iar->imin = lclt->tm_min;
                     32:        iar->isec = lclt->tm_sec;
                     33: }

unix.superglobalmegacorp.com

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