diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-04-06 14:56:18 -0400 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-04-06 14:56:18 -0400 |
commit | 4e89d70f999c8766a9cebe0700e1d6ea9d7bbfcf (patch) | |
tree | 2baca9564649801aef3be5dc4600284900d528d6 /watch-library/shared/watch/watch_utility.c | |
parent | 2cba47996ed08c83b7c9b2ba521b68fb8a62f666 (diff) | |
parent | 1ec1f2e4207405d55c34c936e2c458cb4a7e8806 (diff) | |
download | Sensor-Watch-4e89d70f999c8766a9cebe0700e1d6ea9d7bbfcf.tar.gz Sensor-Watch-4e89d70f999c8766a9cebe0700e1d6ea9d7bbfcf.tar.bz2 Sensor-Watch-4e89d70f999c8766a9cebe0700e1d6ea9d7bbfcf.zip |
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into mars-clock
Diffstat (limited to 'watch-library/shared/watch/watch_utility.c')
-rw-r--r-- | watch-library/shared/watch/watch_utility.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/watch-library/shared/watch/watch_utility.c b/watch-library/shared/watch/watch_utility.c index 3f8aa619..252624b3 100644 --- a/watch-library/shared/watch/watch_utility.c +++ b/watch-library/shared/watch/watch_utility.c @@ -188,3 +188,11 @@ float watch_utility_thermistor_temperature(uint16_t value, bool highside, float return reading; } + +uint32_t watch_utility_offset_timestamp(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; +} |