This more an observation on which I’m interested in other people’s thoughts and solutions:
I’ve recently made two apps both of which use QML Timers to query / poll an external resource regularly.
The first app defaulted to 10 minutes and I didn’t notice any irregularities, but the second app defaulted to a poll once every 2 hours and then I noticed it wasn’t polling at all until I lowered the polling time to every 10 minutes (or lower) as well.
Is this a familiar topic for others? I don’t really want to poll the service as often as every 10 minutes.
A wild guess without any knowledge: when screen blanks, it pushes the app on background making the cover the only active part. The timer pauses if it’s not in the cover.
Yup, been there when I released the Kitchen Timer app 6 yrs ago and it only worked for a few minutes Nemo Keepalive BackgroundJob wasn’t available, so I had to make a QML module using libiphb.
Still using it out of pure laziness
I solved my timer problem with timedclient-qt5 in my app Rush Hour. (https://github.com/Rikujolla/trafficviewer) Keepalive came later and seems to be better tool nowadays. Have to use it next time.