Standard C++ Library Reference ISO/IEC (VERSION3)
The function stores in the static-duration time string a 26-character English-language representation of the time
encoded in *tptr. It returns the address of the static-duration time string. The text representation takes the
form:
Sun Dec 2 06:55:15 1979\n\0
clock
clock_t clock(void);
The function returns the number of clock ticks of elapsed processor time, counting from a time related to
program startup, or it returns -1 if the target environment cannot measure elapsed processor time.
CLOCKS_PER_SEC
#define CLOCKS_PER_SEC <integer constant expression > 0>
The macro yields the number of clock ticks, returned by clock, in one second.
clock_t
typedef a-type clock_t;
The type is the arithmetic type a-type of an object that you declare to hold the value returned by clock,
representing elapsed processor time.
ctime
char *ctime(const time_t *tod);
The function converts the calendar time in *tod to a text representation of the local time in the static-duration
time string. It returns the address of that string. It is equivalent to asctime(localtime(tod)).
difftime
double difftime(time_t t1, time_t t0);
The function returns the difference t1 - t0, in seconds, between the calendar time t0 and the calendar time
t1.
gmtime
struct tm *gmtime(const time_t *tod);
The function stores in the static-duration time structure an encoding of the calendar time in *tod, expressed as
Universal Time Coordinated, or UTC. (UTC was formerly Greenwich Mean Time, or GMT). It returns the
address of that structure.