Closed Crsarmv7l closed 2 years ago
Closing. The below section of the alarm app and the timestamp function in bluetooth_messages helped me understand how to implement what I wanted.
static bool is_alarm_time(){
time_t now;
struct tm time_tm;
time( &now );
localtime_r( &now, &time_tm );
return time_tm.tm_hour == rtcctl_get_alarm_data()->hour && time_tm.tm_min == rtcctl_get_alarm_data()->minute;
}
Hi, Hoping for some help with a simple timer function.I took a look through time.h and timesync, tried to implement and figure a method but ended up very confused. Seems like most time stuff is relative to something else, which makes sense but also makes it confusing.
I would like to create a timer function that simply executes another function after say 25 minutes. Appreciate any direction for implementation