|
|
coherent
ctime() Time Function ctime()
Convert system time to an ASCII string
#include <time.h>
#include <sys/types.h>
cchhaarr *ccttiimmee(_t_i_m_e_p) ttiimmee_tt *_t_i_m_e_p;
ctime converts the system's internal time into a string that can
be read by humans. It takes a pointer to the internal time type
time_t, which is defined in the header file time.h, and returns a
fixed-length string of the form:
Thu Mar 7 11:12:14 1989\n
time_t is defined in the header ttyyppeess.hh.
ctime is implemented as a call to localtime followed by a call to
asctime.
***** Example *****
For another example of this function, see the entry for asctime.
#include <time.h>
#include <sys/types.h>
main()
{
time_t t;
time(&t);
printf(ctime(&t));
}
***** See Also *****
time, time.h
***** Notes *****
ctime returns a pointer to a statically allocated data area that
is overwritten by successive calls.
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.