KIdleTime library

Dario Freddi drf54321 at
Sat Jul 11 17:38:18 BST 2009

On Saturday 11 July 2009 17:39:31 Sebastian TrĂ¼g wrote:
> >
> >  Not quite so. The user is not all of 'else' that may be happening. If
> > Strigi starts indexing after 20 seconds of user inactivity, then it may
> > kick in e.g. after I start compilation and sit back to watch the output,
> > thus actually starting at rather bad moments (since otherwise it might
> > index while I'm typing the code, which causes much lighter CPU/IO load).
> >
> >  If you really want to index mainly when nothing else is happening, you
> > need to watch the system load. The user inactivity timeout may still be a
> > nice addition, but I would suggest a noticeably higher timeout that would
> > mostly mean that the user really is not doing anything at the moment.
> I agree. Any chance to add support for that to KIdleTime? Maybe making it
> more generic?

Why not. It is definitely possible to, but I need someone to point me in the 
right direction, as I don't know if there's a mechanism to find out the idle 
time of the system

> > > And you're good to go. Now everytime the user will be inactive for 20
> > > seconds, the slot beginIndexing() will be called. Just remember to call
> > > KIdleTime::instance()->catchNextResumeEvent(); in beginIndexing() so
> > > that the slot stopIndexing() will be triggered when the user comes
> > > back.
> > >
> > > 4 lines of code and it looks like a nice addition :)


Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list