Add support for snoozing alarms
Also modified time_manager to pass time by value to time callbacks as it's a fairly small struct and it will probably be more robust.
This commit is contained in:
@@ -38,7 +38,7 @@ static void run_callbacks(void *arg)
|
||||
{
|
||||
const Time time = get_time();
|
||||
for (unsigned i = 0; i < callback_count; ++i)
|
||||
callbacks[i](&time);
|
||||
callbacks[i](time);
|
||||
}
|
||||
|
||||
static int time_command_func(int argc, char **argv)
|
||||
|
||||
@@ -28,7 +28,7 @@ typedef enum {
|
||||
WEEK_DAY_SUNDAY,
|
||||
} WeekDay;
|
||||
|
||||
typedef void (*TimeCallback)(const Time *time);
|
||||
typedef void (*TimeCallback)(Time now);
|
||||
|
||||
/**
|
||||
* Initialize the time module.
|
||||
|
||||
Reference in New Issue
Block a user