#include #include main() { time_t *timer, hardware_timer = 1000000; timer = &hardware_timer; printf("%s", asctime(localtime(timer))); time(timer); printf("%s", asctime(localtime(timer))); } /* * ISO C99 Standard: 7.23 Date and time * type size_t clock_t time_t struct tm { int tm_sec; * Seconds. [0-60] (1 leap second) * int tm_min; * Minutes. [0-59] * int tm_hour; * Hours. [0-23] * int tm_mday; * Day. [1-31] * int tm_mon; * Month. [0-11] * int tm_year; * Year - 1900. * int tm_wday; * Day of week. [0-6] * int tm_yday; * Days in year.[0-365] * int tm_isdst; * DST. [-101]* long int __tm_gmtoff; * Seconds east of UTC. * __const char *__tm_zone; * Timezone abbreviation. * }; macro CLOCKS_PER_SECOND functions clock clock_t clock(void) difftime double difftime(time_t time1, time_t time0) mktime time_t mktime(struct tm *timeptr) time time_t time(time_t *timer) asctime char *asctime(const struct tm *timeptr) ctime char ctime(const time_t *timer) gmtime struct tm *gmtime(const time_t *timer) localtime struct tm *localtime(const time_t *timer) strftime size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) */