mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-02 14:22:55 +03:00
minor: examples: reorder functions for declarations prior to call (#6766)
* minor: reorder functions for declaration prior to call harmless for arduino, helps with emulation on host or PIO * fixes per review
This commit is contained in:
@ -85,6 +85,16 @@ static bool time_machine_running = false;
|
||||
// return 15000; // 15s
|
||||
//}
|
||||
|
||||
#define PTM(w) \
|
||||
Serial.print(" " #w "="); \
|
||||
Serial.print(tm->tm_##w);
|
||||
|
||||
void printTm(const char* what, const tm* tm) {
|
||||
Serial.print(what);
|
||||
PTM(isdst); PTM(yday); PTM(wday);
|
||||
PTM(year); PTM(mon); PTM(mday);
|
||||
PTM(hour); PTM(min); PTM(sec);
|
||||
}
|
||||
|
||||
void showTime() {
|
||||
gettimeofday(&tv, nullptr);
|
||||
@ -152,18 +162,6 @@ void showTime() {
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
|
||||
#define PTM(w) \
|
||||
Serial.print(" " #w "="); \
|
||||
Serial.print(tm->tm_##w);
|
||||
|
||||
void printTm(const char* what, const tm* tm) {
|
||||
Serial.print(what);
|
||||
PTM(isdst); PTM(yday); PTM(wday);
|
||||
PTM(year); PTM(mon); PTM(mday);
|
||||
PTM(hour); PTM(min); PTM(sec);
|
||||
}
|
||||
|
||||
void time_is_set_scheduled() {
|
||||
// everything is allowed in this function
|
||||
|
||||
|
Reference in New Issue
Block a user