The time functions access and reformat the current system date and time. You do not need to specify any special flag to the compiler to use the time functions.
Include the header file for these functions in the program. To include a header file, use the following statement:
#include <time.h>
The time services are the
following:
adjtime | Corrects the time to allow synchronization of the system clock. |
ctime, localtime, gmtime, mktime, difftime, asctime, tzset | Converts date and time to string representation. |
getinterval, incinterval, absinterval, resinc, resabs, alarm, ualarm, getitimer, setitimer | Manipulates the expiration time of interval timers. |
gettimer, settimer, restimer, stime, time | Gets or sets the current value for the specified systemwide timer. |
gettimerid | Allocates a per-process interval timer. |
gettimeofday, settimeofday, ftime | Gets and sets date and time. |
nsleep, usleep, sleep | Suspends a current process from running. |
reltimerid | Releases a previously allocated interval timer. |