Hauptprogramm

Dependencies:   ILI9340_Driver_Lib PM2_Libary Lib_DFPlayerMini

Time/realtimer.cpp

Committer:
ackerden
Date:
2021-05-05
Revision:
30:39a53ed11b7d
Parent:
14:153f377f4030

File content as of revision 30:39a53ed11b7d:

#include "mbed.h"
#include "mbed_rtc_time.h"

#include "realtimer.h"


//Zeitfunktion
void uhrzeit(time_t){
    time_t seconds = time(NULL);
    printf("%u\n", time(NULL));
    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);
}