Drop libs rtc (#1248)

This commit is contained in:
あく
2022-05-19 22:53:33 +03:00
committed by GitHub
parent 9c3f465afd
commit e8de94ca00
3 changed files with 48 additions and 12 deletions

View File

@@ -72,19 +72,8 @@ bool dolphin_state_load(DolphinState* dolphin_state) {
uint64_t dolphin_state_timestamp() {
FuriHalRtcDateTime datetime;
struct tm current;
furi_hal_rtc_get_datetime(&datetime);
current.tm_year = datetime.year - 1900;
current.tm_mday = datetime.day;
current.tm_mon = datetime.month - 1;
current.tm_hour = datetime.hour;
current.tm_min = datetime.minute;
current.tm_sec = datetime.second;
return mktime(&current);
return furi_hal_rtc_datetime_to_timestamp(&datetime);
}
bool dolphin_state_is_levelup(uint32_t icounter) {