"the present time": at run-time or at compile-time?
"unix timestamp": not sure what you mean by this? Do you mean a Unix timestamp format?
I suspect you want the [tt]__TIME__[/tt] and [tt]__DATE__[/tt] predefined macros (if you want the compile-time information; or the [tt]asctime()[/tt] function (from [tt]time.h[/tt]) if you want it at run-time.
________________________________________ Roger J Coult; Grimsby, UK In the game of life the dice have an odd number of sides.
If you had an idea about the [tt]time[/tt] function, datapath, why ask the question you did. I looked at the documentation and found this:
__________________________________________________________ time
[tt]time[/tt] returns the time in elapsed seconds. There is no error return.
Parameter
[tt]timer[/tt] -- Storage location for time
Remarks
The [tt]time[/tt] function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time, according to the system clock. The return value is stored in the location given by [tt]timer[/tt]. This parameter may be [tt]NULL[/tt], in which case the return value is not stored.
__________________________________________________________
Seems it does exactly what you want.
________________________________________ Roger J Coult; Grimsby, UK In the game of life the dice have an odd number of sides.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.