InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.65k stars 912 forks source link

DateTimeController: Remove SetTime tick parameter #1639

Closed Riksu9000 closed 1 year ago

Riksu9000 commented 1 year ago

The systick doesn't need to be updated when setting time.

Also removed unused nrf_rtc.h includes.

I guess this change will make it so depending on the previous systick value, the time can shift an amount less than one second. Is this a problem?

github-actions[bot] commented 1 year ago
Build size and comparison to develop: Section Size Difference
text 414712B -80B
data 940B 0B
bss 53544B 0B
JF002 commented 1 year ago

I guess this change will make it so depending on the previous systick value, the time can shift an amount less than one second. Is this a problem?

I think you're right : the time that elapsed between the last call to UpdateTime() with a valid systick and the call to SetTime() will be lost. Is this an issue? Probably not, since was are setting a new time anyway.

And yeah.. it does not make sense that the rest of the application needs to have access to the systick when setting a new time so I think this PR is valid :+1!