| Motore di ricerca datesheet componenti elettronici |
|
AN1780 Scheda tecnica(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1780 Scheda tecnica(HTML) 4 Page - STMicroelectronics |
|
4 / 9 page ![]() 4/9 STR71X REAL TIME CLOCK APPLICATION EXAMPLE NOTE: 0x3FF36300 is the number of seconds from 01/01/1970 to 01/01/2004. 5.1.3 C Functions used 5.1.3.1 localtime Converts time in seconds since Unix Epoch to local time. ■ SYNOPSIS #include <time.h> extern struct tm *localtime(const time_t * /*timer*/); ■ Description Converts the calendar time pointed to by timer into a broken-down time, expressed a local time. ■ Returns Returns pointer (ptim) to static data, it converts a time as returned by the time function to a 9-element list with the time analysed for the local time zone. Typically use the following tm structure: struct tm { int tm_sec; /* seconds after the minute, 0 to 60 (0 - 60 allows for the occasional leap second) */ int tm_min; /* minutes after the hour, 0 to 59 */ int tm_hour; /* hours since midnight, 0 to 23 */ int tm_mday; /* day of the month, 1 to 31 */ int tm_mon; /* months since January, 0 to 11 */ int tm_year; /* years since 1900 */ int tm_wday; /* days since Sunday, 0 to 6 */ int tm_yday; /* days since January 1, 0 to 365 */ int tm_isdst; /* Daylight Savings Time flag */ }; 5.1.3.2 mktime() Converts local time to seconds since the Unix Epoch ■ SYNOPSIS #include <time.h> extern time_t mktime(struct tm * /*timeptr*/); ■ DESCRIPTION The mktime() function converts the broken-down time, expressed as local time, in the struc- ture pointed to by timeptr into a calendar time value with the same encoding as that of the values returned by the time() function. |
|
|
Link URL |
| Lei ha avuto il aiuto da alldatasheet? [ DONATE ] |
Di alldatasheet | Richest di pubblicita | contatti | Privacy Policy | Collegamento alla scheda tecnica | scambio Link | Ricerca produttore All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |