Schüler NWT
/
WF_RTC
a
main.cpp
- Committer:
- bulmenwt
- Date:
- 2015-01-28
- Revision:
- 0:ae1ce8847fe3
File content as of revision 0:ae1ce8847fe3:
/*M0-BOARD LPC11U24 VERSION 1.0 WF 01_2015 BULME Graz / Elektronik Polling eines Tasters Datei: WF_taster_polling/main.cpp */ #include "mbed.h" int main() { while(1) { time_t seconds = time(NULL); printf("Time as seconds since January 1, 1970 = %d\n", seconds); printf("Time as a basic string = %s", ctime(&seconds)); char buffer[32]; strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds)); printf("Time as a custom formatted string = %s", buffer); wait(1); } }