mirror of https://github.com/ARMmbed/mbed-os.git
mbed_rtc_time.h - documentation fix
Make example code consistent with: https://os.mbed.com/teams/mbed_example/code/time_HelloWorld/file/0c6401d671c6/main.cpp/pull/8503/head
parent
ba23fef90b
commit
0a1e3a0c52
|
|
@ -40,10 +40,10 @@ extern "C" {
|
|||
* int main() {
|
||||
* set_time(1256729737); // Set RTC time to Wed, 28 Oct 2009 11:35:37
|
||||
*
|
||||
* while(1) {
|
||||
* while (true) {
|
||||
* time_t seconds = time(NULL);
|
||||
*
|
||||
* printf("Time as seconds since January 1, 1970 = %d\n", seconds);
|
||||
* printf("Time as seconds since January 1, 1970 = %u\n", (unsigned int)seconds);
|
||||
*
|
||||
* printf("Time as a basic string = %s", ctime(&seconds));
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue