I am learning to develop an application by using Quickly (
quickly create ubuntu-application). This application will stay in Application Indicator / Notification Bar and only work when a defined "alarm" is triggered by the time or the main window is opened by the user. What is the recommended way to implement the "alarm" so it minimizes the CPU works and saves the battery?
Other issue to be considered is that the user may change the system date & time.
Currently I have these:
gi.repository.GLib.timeout_add_seconds(60, . . .)to check every minutes, so it will not miss if the user update the system date & time.
- Using cron; the problem will be the communication between the UI program and the triggered program (by cron).
- Using a sleeping thread; not sure.
Maybe you have another better idea? Technical explanation are welcomed :). — Thank you