Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I check for PROGRAM idle time, as opposed to SYSTEM idle time?
    primarykey
    data
    text
    <p>I've been lurking on SO for awhile, it's been a great resource. Now I'll try to be an active member... :)</p> <p>I have a program that occasionally needs to scan some directories recursively (an improvement for this part of the program is in the pipeline, but won't be ready for a while). To avoid the user having to wait for this scanning, I would like to do the scanning while the user isn't using my program when possible.</p> <p>I intend to implement it by running a timer that checks for idle time. I've found the following for checking system idle time: <a href="http://www.delphitips.net/2007/11/11/how-to-detect-system-idle-time/" rel="noreferrer">http://www.delphitips.net/2007/11/11/how-to-detect-system-idle-time/</a></p> <p>This would be functional, but I would prefer to activate the function even when the user is working with other programs on the same computer. This way, if he switches to another program, I could catch up on the scanning I need to do.</p> <p>I realize that I could do the scanning in a background thread, and either that or some sort of windows hooks will be implemented at some point, but not just yet.</p> <p>EDIT: The goal here is a relatively easy change to the program to do any scanning that might be queued while the user isn't actively using MY application. The scanning isn't especially intensive, but it isn't done in a thread, and therefore freezes my app while in progress. Basically, I'm looking for a quick win while I'm working on a more long term solution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload