x

C – time.h library functions

Prev     Next

C time.h library functions:


All C inbuilt functions which are declared in time.h header file are given below. The source code for time.h header file is also given below for your reference.

List of inbuilt C functions in time.h file:

Below are the list of time related fuctions in C programming language. Please refer C – time related functions page for sample program and output for each below functions.


Functions Description
setdate() This function used to modify the system date
getdate() This function is used to get the CPU time
clock() This function is used to get current system time
time() This function is used to get current system time as structure
difftime() This function is used to get the difference between two given times
strftime() This function is used to modify the actual time format
mktime() This function interprets tm structure as calendar time
localtime() This function shares the tm structure that contains date and time informations
gmtime() This function shares the tm structure that contains date and time informations
ctime() This function is used to return string that contains date and time informations
asctime() Tm structure contents are interpreted by this function as calendar time. This time is converted into string.

Source code for time.h header file:

Please find the source code for time.h header file below. This code is taken from DevC++ compiler files for your reference.

Prev     Next



Like it? Please Spread the word!