the right time?

Kenneth L Moore yahoo at unix.cis.pitt.edu
Thu Jan 25 12:35:16 AEST 1990


In article <9600004 at silver> sl195102 at silver.ucs.indiana.edu writes:

=>But I am still having
=>trouble with the time function.

=>Could someone send me a peice of sample code that will show how many hours
=>it is after midnight, in either string or long form. 

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

main()
{
   long timeofday;

   timeofday = time(0);
   printf("\n Time and date of program run: \n %s\n",ctime(&timeofday));

}
-- 
I don't yell and I don't tell and I'm grateful as hell: Benny Hill



More information about the Comp.lang.c mailing list