From
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_time.asp
"The time function returns the number of seconds elapsed since midnight
(00:00:00), January 1, 1970, coordinated universal time, according to
the system clock."
On a Microsoft system. Or on a POSIX one possibly (the POSIX standard
says that the time is returned in seconds "since the Epoch", which is
not necessarily 1970).
That sounds like what you're looking for. The time() function is
standard.
But what it returns isn't:
7.23.2.5 The time function
Synopsis
1 #include <time.h>
time_t time(time_t *timer);
Description
2 The time function determines the current calendar time. The encoding
of the value is unspecified.
time_t is an "arithmetic type capable of representing times", but there
is no guarantee that it is even linear (it could be bit fields in a
structure with year, month, day, hours, minutes, seconds and jiffies for
instance) or even an integer (a double precision number in Julian days
with a fractional component, for example).
For that matter, time(NULL) might return (time_t)-1 as a constant value
if the calendar time isn't available, even POSIX doesn't guarantee that
it is available.
Chris C