[{"@context":"http:\/\/schema.org\/","@type":"BlogPosting","@id":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/timeh-wikipedia\/#BlogPosting","mainEntityOfPage":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/timeh-wikipedia\/","headline":"TIME.h \u2014 Wikipedia","name":"TIME.h \u2014 Wikipedia","description":"before-content-x4 A wikipedia article, free l’encyclop\u00e9i. after-content-x4 And are headers, respectively of the standard library of the C and C","datePublished":"2018-11-28","dateModified":"2018-11-28","author":{"@type":"Person","@id":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/author\/lordneo\/#Person","name":"lordneo","url":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/author\/lordneo\/","image":{"@type":"ImageObject","@id":"https:\/\/secure.gravatar.com\/avatar\/44a4cee54c4c053e967fe3e7d054edd4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/44a4cee54c4c053e967fe3e7d054edd4?s=96&d=mm&r=g","height":96,"width":96}},"publisher":{"@type":"Organization","name":"Enzyklop\u00e4die","logo":{"@type":"ImageObject","@id":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","url":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","width":600,"height":60}},"image":{"@type":"ImageObject","@id":"https:\/\/fr.wikipedia.org\/wiki\/Special:CentralAutoLogin\/start?type=1x1","url":"https:\/\/fr.wikipedia.org\/wiki\/Special:CentralAutoLogin\/start?type=1x1","height":"1","width":"1"},"url":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/timeh-wikipedia\/","wordCount":1607,"articleBody":" (adsbygoogle = window.adsbygoogle || []).push({});before-content-x4A wikipedia article, free l’encyclop\u00e9i. (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4 And are headers, respectively of the standard library of the C and C ++ language, which declare functions providing standardized manipulation of dates and their formatting. (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4char * asctime (const struct tm* tmptr ) Converted tmptr in a character string in format Www Mmm dd hh:mm:ss yyyy , Or Www is the day of the week, Mmm is the month in letters, dd The day of the month, hh:mm:ss is time, and yyyy is the year. The chain is followed by a return to the line and an end of the chain, for a total of 26 characters. The result chain is allocated statically and shared by the functions ctime And asctime . Each time one of the two functions is called, the content this chain is replaced. clock_t clock (void) Returns an approximation of the processor time used by the process. char* ctime (const time_t* timer ) Converts the value timer in a chain in the same format as asctime . The returned chain is allocated statically in a shared area with asctime . ctime uses the internal buffer of gmtime And localtime As a return pointer, a call to this function will therefore cause crushing. double difftime (time_t Timer2 , time_t Timer1 ) (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4Returns the difference, expressed in seconds between two moments. struct tm* gmtime (const time_t* timer ) Converts a type value time_t In a TM structure in UTC time. This structure is allocated statically and shared by the functions gmtime , localtime And ctime . Each time one of these functions is called, the content of the structure is crushed. struct tm* gmtime_r (const time_t* timer , struct tm* result ) Converts a type value time_t In a TM structure in UTC time. The date is stored in the TM structure pointed out by result . This is a version compatible with the threads of gmtime . struct tm* localtime (const time_t* timer ) Converts a type value time_t in a TM structure at local time. This structure is allocated statically and shared by the functions gmtime , localtime And ctime . Each time one of these functions is called, the content of the structure is crushed. time_t mktime (struct tm* ptm ) Converts a structure tm in a type of type time_t . mktime Check the TM structure, by correcting the values \u200b\u200bof its attributes if they are poorly informed, and translates this structure into a value time_t which has returned. The original values \u200b\u200bof the fields tm_wday And tm_yday (day of week and year) of ptm are ignored, but the fields are filled with the values \u200b\u200bthat correspond to the calculated date. The value of tm_day is not checked until tm_wday And tm_yday are determined. In the event of an error, the function returns the value (time_t)-1 . time_t time (time_t* timer ) Gives current time. The value is stored in the object pointed out by timer . In the case where timer is zero, the value has only passed as a result of the function. Standard C specifies that the type time_t is arithmetic, but that its encoding is not specified, which makes this type practically opaque. The POSIX standard specifies that time_t contains the number of seconds since first is January 1970 (Unix time). size_t strftime (char* s , size_t n , const char* format , const struct tm* tptr ) Formed at the structure tm in a character string, written in s , which contains at most n characters. CLK_PER_SEC Constant that defines the number of clock blows per second. It is used by the function clock() . CLOCKS_PER_SEC Another name of CLK_PER_SEC used by a few libraries. CLK_TCK An obsolete macro from CLK_PER_SEC. clock_t Type of data returned by Clock (). Generally defined by types int or long int . time_t Type of data returned by Time (). Generally defined by types int or long int . struct tm Human representation and calendar of dates. Calendar [ modifier | Modifier and code ] The human representation of dates (“Broken-Down Time” in English) is represented in the standard library C by the structure struct tm Here are the members: Member Description int tm_hour Time (0 – 23) int tm_isdst Indicator on the offset between winter and summer time: is 1 if the discrepancy is active, 0 if it is not and a negative value if the information is not available. int tm_mday Day of the month (1 – 31) int tm_min minutes (0 – 59) int tm_mon months (0 – 11, 0 corresponds to January) int tm_sec seconds (0 – 59) int tm_wday Day of the week (0-6, 0 corresponds to Sunday) int tm_yday Day of year (0 – 365) int tm_year number of years since 1900 (in) The GNU C Library ReferenceManual , July 6, 2001 ( read online ) , \u00ab\u00a0Calendar Time\u00a0\u00bb (in) The Open Group BaseSpecifications , December 9, 2008 ( read online ) , \u00abGmtime\u00bb (adsbygoogle = window.adsbygoogle || []).push({});after-content-x4"},{"@context":"http:\/\/schema.org\/","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/#breadcrumbitem","name":"Enzyklop\u00e4die"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/wiki.edu.vn\/all2en\/wiki32\/timeh-wikipedia\/#breadcrumbitem","name":"TIME.h \u2014 Wikipedia"}}]}]