1: /*
   2: char id_itime[] = "@(#)itime_.c	1.1";
   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    "../libI77/fiodefs.h"
  14: #include    <sys/types.h>
  15: #include    <time.h>
  16: 
  17: itime_(iar)
  18: struct { ftnint ihr; ftnint imin; ftnint isec; } *iar;
  19: {
  20:     struct tm *localtime(), *lclt;
  21:     time_t time(), t;
  22: 
  23:     t = time(0);
  24:     lclt = localtime(&t);
  25:     iar->ihr = (ftnint) lclt->tm_hour;
  26:     iar->imin = (ftnint) lclt->tm_min;
  27:     iar->isec = (ftnint) lclt->tm_sec;
  28: }

Defined functions

itime_ defined in line 17; never used
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 617
Valid CSS Valid XHTML 1.0 Strict