clock_t
size_t both arithmetic types which can represent times
struct tm holds components of calendar time:
int tm_sec seconds after the minute (0, 61)
int tm_min minutes after the hour (0, 59)
int tm_hour hours since midnight (0, 23)
int tm_mday day of the month (1, 31)
int tm_mon months since January (0, 11)
int tm_year years since 1900
int tm_wday days since Sunday (0, 6)
int tm_yday days since January 1 (0, 365)
int tm_isdst Daylight Savings Time flag
clock_t clock(void);
time_t time(time_t *tp);
double difftime(time_t time2, time_t time1);
time_t mktime(struct tm *tp);
char *asctime(const struct tm *tp)
char *ctime(const time_t *tp);
char tm *gmtime(const time_t *tp);
struct tm *localtime(const time_t *tp);
size_t strftime(char *s, size_t smax, const char *fmt,
const struct tm *tp);
conversions for fmt:
%a abbreviated weekday name
%A full weekday name
%b abbreviated month name
%B full month name
%c local date and time
%d day of the month (01-31)
%H hour (00-23)
%I hour (01-12)
%j day of the year (001-366)
%m month (01-12)
%M minute (00-59)
%p AM/PM
%S second (00-61)
%U week number of the year, Sunday first day (00-53)
%w weekday (0-6, Sunday 0)
%W week number of the year, Monday first day (00-53)
%x local date
%X local time
%y year without century (00-99)
%Y year with century
%Z time zone name
%% %