QML Timers longer than 10 minutes?

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.

1 Like

Have you considered using Nemo Keepalive BackgroundJob instead?
https://sailfishos.org/develop/docs/nemo-qml-plugins-keepalive/qml-nemo-keepalive-backgroundjob.html/

2 Likes

Nope, but I will thanks!

I’m still in the phase that I’m happy that I actually released two (kinda) working apps.

3 Likes

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.

timers paused because of sleep. power management stuff :)))
use keepalive module as suggested above.

1 Like

Yup, been there when I released the Kitchen Timer app 6 yrs ago and it only worked for a few minutes :smiley: Nemo Keepalive BackgroundJob wasn’t available, so I had to make a QML module using libiphb.
Still using it out of pure laziness :wink:

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.