| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f217a31 commit eb1611d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,10 +138,12 @@ int main(int argc, char **argv) { | |||
| 138 | 138 | mp_thread_init(); | |
| 139 | 139 | #endif | |
| 140 | 140 | ||
| 141 | - // Start and initialise the RTC | ||
| 142 | - struct timespec ts = { 0, 0 }; | ||
| 143 | - ts.tv_sec = timeutils_seconds_since_epoch(2021, 1, 1, 0, 0, 0); | ||
| 144 | - aon_timer_start(&ts); | ||
| 141 | + if (!aon_timer_is_running()) { | ||
| 142 | + // Start and initialise the RTC if not already running | ||
| 143 | + struct timespec ts = { 0, 0 }; | ||
| 144 | + ts.tv_sec = timeutils_seconds_since_epoch(2021, 1, 1, 0, 0, 0); | ||
| 145 | + aon_timer_start(&ts); | ||
| 146 | + } | ||
| 145 | 147 | mp_hal_time_ns_set_from_rtc(); | |
| 146 | 148 | ||
| 147 | 149 | // Initialise stack extents and GC heap. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments