time_t
clock_t
size_t
struct tm
Functions | Description |
---|---|
time_t time(time_t *time); | Returns local time by converting time_t using pointer |
char *ctime(const time_t *time); | Returns local time by converting time_t using pointer |
struct tm *localtime(const time_t *time); | Returns to tm structure using pointer to represent local time |
clock_t clock(void) | Returns duration of current running program |
char * asctime(const struct tm * time); | Returns pointer to structure converting the data to day month date hours:minutes:seconds:year\n\0 format |
struct tm * gmtime(const time_t *time); | Returns pointer to structure representing the GMT time |
time_t mktime(struct tm *time); | Returns the exact time in the structure when pointer points it. |
double difftime(time_t time2, time_t time1); | Calculates the differences between time1 and time2 |
size_t strftime(); | Returns formatted date and time |
Field | Type | Meaning | Range |
---|---|---|---|
tm_sec | int | represents seconds of minutes | 0-61 |
tm_min | int | represents minutes of hour | 0-59 |
tm_hour | int | represents hours of day | 0-23 |
tm_mday | int | represents day of month | 1-31 |
tm_mon | int | represents month of year from January | 0-11 |
tm_year | int | represents years since 1900 | |
tm_wday | int | represents days since Sunday | 0-6 |
tm_yday | int | represents days since January 1st | 0-365 |
tm_isdst | int | represents hours saving day time |