Standard C++ Library Reference ISO/IEC (VERSION3)
Next
<time.h>
Include the standard header <time.h> to declare several functions that help you manipulate times. The
diagram summarizes the functions and the object types that they convert between.
The functions share two static-duration objects that hold values computed by the functions:
a time string of type array of char●
a time structure of type struct tm●
A call to one of these functions can alter the value that was stored earlier in a static-duration object by another
of these functions.
/* MACROS */
#define CLOCKS_PER_SEC <integer constant expression > 0>
#define NULL <either 0, 0L, or (void *)0> [0 in C++]
/* TYPES */
typedef a-type clock_t;
typedef ui-type size_t;
typedef a-type time_t;
struct tm;
/* FUNCTIONS */
char *asctime(const struct tm *tptr);
clock_t clock(void);
char *ctime(const time_t *tod);
double difftime(time_t t1, time_t t0);
struct tm *gmtime(const time_t *tod);
struct tm *localtime(const time_t *tod);
time_t mktime(struct tm *tptr);
size_t strftime(char *s, size_t n,
const char *format, const struct tm *tptr);
time_t time(time_t *tod);
asctime
char *asctime(const struct tm *tptr);