mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #21096 from benpicco/rtc_mktime-const
sys/rtc_utils: make parameter to `rtc_mktime()` const
This commit is contained in:
commit
4f55461e15
@ -69,7 +69,7 @@ int rtc_tm_compare(const struct tm *a, const struct tm *b);
|
||||
*
|
||||
* @return elapsed seconds since `RIOT_EPOCH`
|
||||
*/
|
||||
uint32_t rtc_mktime(struct tm *t);
|
||||
uint32_t rtc_mktime(const struct tm *t);
|
||||
|
||||
/**
|
||||
* @brief Converts an RTC timestamp into a time struct.
|
||||
|
@ -177,7 +177,7 @@ void rtc_tm_normalize(struct tm *t)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t rtc_mktime(struct tm *t)
|
||||
uint32_t rtc_mktime(const struct tm *t)
|
||||
{
|
||||
unsigned year = t->tm_year + 1900;
|
||||
uint32_t time = t->tm_sec
|
||||
|
Loading…
Reference in New Issue
Block a user