diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-02 18:39:45 -0500 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-02 18:39:45 -0500 |
commit | cd405735351035df657b64547b3dfc6a3d59db56 (patch) | |
tree | 1cdd5e6b0d0434d20f71045178a1e5e7377eb56f /movement/watch_faces/complication/countdown_face.c | |
parent | 0004c30f422e702fd184a54e9f1d55da878bcd0f (diff) | |
parent | 35d1f5e647ac1b5fcccdb43ec58058587dd5301b (diff) | |
download | Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.tar.gz Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.tar.bz2 Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.zip |
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into motion-express
Diffstat (limited to 'movement/watch_faces/complication/countdown_face.c')
-rw-r--r-- | movement/watch_faces/complication/countdown_face.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/movement/watch_faces/complication/countdown_face.c b/movement/watch_faces/complication/countdown_face.c index a910e96c..81836f37 100644 --- a/movement/watch_faces/complication/countdown_face.c +++ b/movement/watch_faces/complication/countdown_face.c @@ -35,14 +35,6 @@ #define DEFAULT_MINUTES 3 -static uint32_t offset_date_time(uint32_t now, int8_t hours, int8_t minutes, int8_t seconds) { - uint32_t new = now; - new += hours * 60 * 60; - new += minutes * 60; - new += seconds; - return new; -} - static inline int32_t get_tz_offset(movement_settings_t *settings) { return movement_timezone_offsets[settings->bit.time_zone] * 60; } @@ -52,7 +44,7 @@ static void start(countdown_state_t *state, movement_settings_t *settings) { state->mode = cd_running; state->now_ts = watch_utility_date_time_to_unix_time(now, get_tz_offset(settings)); - state->target_ts = offset_date_time(state->now_ts, 0, state->minutes, state->seconds); + state->target_ts = watch_utility_offset_timestamp(state->now_ts, 0, state->minutes, state->seconds); watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, get_tz_offset(settings)); movement_schedule_background_task(target_dt); watch_set_indicator(WATCH_INDICATOR_BELL); |