| 701 | } |
| 702 | |
| 703 | void modSetTime(uint32_t seconds) |
| 704 | { |
| 705 | #if !ESP32 |
| 706 | struct rtc_timeval rtc_tv; |
| 707 | |
| 708 | if (!gRTCInit) { |
| 709 | rtctime_early_startup(); |
| 710 | rtctime_late_startup(); |
| 711 | gRTCInit = true; |
| 712 | } |
| 713 | |
| 714 | rtc_tv.tv_sec = seconds; |
| 715 | rtc_tv.tv_usec = 0; |
| 716 | |
| 717 | rtctime_settimeofday(&rtc_tv); |
| 718 | #else |
| 719 | struct timeval tv; |
| 720 | struct timezone tz; |
| 721 | |
| 722 | tv.tv_sec = seconds; |
| 723 | tv.tv_usec = 0; |
| 724 | |
| 725 | settimeofday(&tv, NULL); //@@ implementation doesn't use timezone yet.... |
| 726 | #endif |
| 727 | } |
| 728 | |
| 729 | #if ESP32 |
| 730 | static void updateTZ(void) |
no outgoing calls
no test coverage detected