Sfoglia il codice sorgente

Simpler timestamp code

Willy-JL 1 anno fa
parent
commit
2a0ca6305e
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      nightstand_clock/clock_app.c

+ 1 - 3
nightstand_clock/clock_app.c

@@ -225,9 +225,7 @@ static void clock_tick(void* ctx) {
 
 void timer_start_stop(ClockState* plugin_state) {
     // START/STOP TIMER
-    DateTime curr_dt;
-    furi_hal_rtc_get_datetime(&curr_dt);
-    uint32_t curr_ts = datetime_datetime_to_timestamp(&curr_dt);
+    uint32_t curr_ts = furi_hal_rtc_get_timestamp();
 
     if(plugin_state->timer_running) {
         // Update stopped seconds