Re: Xsync alarm implementation
Re: Xsync alarm implementation
- Subject: Re: Xsync alarm implementation
- From: René J.V. Bertin <email@hidden>
- Date: Thu, 19 Nov 2015 18:44:23 +0100
On Thursday November 19 2015 09:08:16 Jeremy Huddleston Sequoia wrote:
> Regarding doing something similar in OS X, I'm not sure if there's something that matches exactly what you're looking for.
That's my impression too
> A naive approach would be to use dispatch_after() to check the idle time at an appropriate time in the future (target_idle_time - current_idle_time).
That's still polling, so not different from any approach using another kind of timer, right? Is it supposed to be more precise, or more friendly to the power manager (battery use) than, say, a QTimer? There doesn't appear to be an easy way to cancel a scheduled dispatch, right?
The question in this context is how you continue after that initial interval, if the period you're timing hasn't ended at target_idle_time. How long should you wait then before you check again; I think that's an ill-defined problem.
The only variable there is one can set a watch on is HIDIdleTime. I'm not even sure how XSync implements its alarm if not with a polling timer (and probably one for every configured timeout to monitor).
Then again, I am probably thinking too much about this, taking a step back I don't really see why indeed I'd have to do something smarter than simply setting a timer at some known future moment in time to see if the idle condition still applies.
R.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden