Im trying to build an alarm clock, using notifications as the trigger on when the alarm should go off. Im having a hard time to figure out how i should do to compare the time from when the alarm is set, and compare that to the time when the alarm should go off. As i understand the notification should be feed with seconds from now, when the notification should go off.
How should i do to compare the time now with the time the alarm is set to go off, i want to use a 24 h time?
For example
Alarm set Alarm rings Diff
21:59:23 07:00 ?
Is notifications the best way to build an alarm clock or is there another solution that would do a better job?