Time Info

mike.stefanik mike at bria.UUCP
Sun May 26 03:34:38 AEST 1991


In an article, molnar at neis.UUCP (Christopher Molnar) writes:
>I am writing a C routine that needs to compare a start time and
>the current time and have the result in minute.

#include <time.h>
#include <sys/types.h>

time_t
deltat(since)
time_t since;
{
time_t now;

	time(&now);
	return(now - since);
}

-- 
Michael Stefanik, MGI Inc, Los Angeles | Opinions stated are never realistic
Title of the week: Systems Engineer    | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
If MS-DOS didn't exist, who would UNIX programmers have to make fun of?



More information about the Comp.lang.c mailing list