Pages

Friday 4 July 2014

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:


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

0 comments:

Post a Comment