CLOCKS_PER_SEC | Number of clock ticks per second. |
struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; }; |
This is the definition of the struct tm structure: seconds [0-59] minutes[0-59] hours [0-23] day of month [1-31] months since January [0-11] year - 1900 day of week days since Jan 1 daylight savings switch |
char *asctime(const struct tm *t); | Formats a string displaying the time and date contained in the structure pointed to by t.
The format of the string is: "Thu Jul 21 19:02:39 1998\n" |
char *ctime(const time_t *t); | Formats a string displaying the time and date contained in the time_t variable t. |
double difftime(time_t t2, time_t t1); | Calculates the difference in seconds of the two time_t variables. |
struct tm *gmtime(const time_t *t); | Takes a time_t variable pointed to by t and constructs a struct tm structure containing the day, month, year, hour, minute, seconds, and day of the week. The date and time represented is Greenwich Mean Time, otherwise known as Co-ordinated Universal Time. |
struct tm *localtime(const time_t *t); | Does the same thing as gmtime() but the date and time represented is local time. |
time_t time(time_t *t); | Returns the current date and time as a value of type time_t - the encoding is implementation dependent. |
time_t mktime(struct tm *tptr); | Converts the date and time represented in the struct tm that tptr points to into a time_t value. |
clock_t clock(void); | Returns the elapsed processor time since the start of the current process in ticks. |
size_t strftime(char *s, size_t maxsize, const char *fmt, const struct tm *t); | |||||||||||||||||||||||||||||||||||||||||||
Takes the time stored in a struct tm at the address pointed to by t and makes a string representation of it based on the fmt string.
Places the character array s, which is of maxsize characters in size. The format codes are:
|