The <time.h> header provides several functions useful for reading and converting the current time and date.
The <time.h> header shall define the following macro constant:
The <time.h> header shall define the following function:
Time manipulation:
Conversion:
The <time.h> header shall define the following type:
Related topics:
<tgmath.h> | <threads.h> | <uchar.h> | <wchar.h> | <wctype.h> | Standard Library in C
List of topics: C Programming
The <time.h> header shall define the following macro constant:
CLOCKS_PER_SEC | number of processor clock ticks per second |
The <time.h> header shall define the following function:
Time manipulation:
difftime | computes the difference between times |
time | returns the current calendar time of the system as time since epoch |
clock | returns raw processor clock time since the program is started |
timespec_get | returns the calendar time based on a given time base (C11) |
Conversion:
asctime asctime_s(C11) | converts a tm object to a textual representation |
ctime ctime_s(C11) | converts a time_t object to a textual representation |
strftime | converts a tm object to custom textual representation (function) |
gmtime gmtime_s(C11) | converts time since epoch to calendar time expressed as Coordinated Universal Time (UTC) |
localtime localtime_s(C11) | converts time since epoch to calendar time expressed as local time |
mktime | converts calendar time to time since epoch |
The <time.h> header shall define the following type:
tm | calendar time type (struct) |
time_t | calendar time since epoch type |
clock_t | processor time since era type |
timespec | time in seconds and nanoseconds (struct)(C11) |
Related topics:
<tgmath.h> | <threads.h> | <uchar.h> | <wchar.h> | <wctype.h> | Standard Library in C
List of topics: C Programming
No comments:
Post a Comment